[PHP-BUG] Bug #74583 [NEW]: On Create a constructor

[email protected] ("principe dot borodin at gmail dot com") Fri, 12 May 2017 14:34:48 GMT
Newsgroups php.standards
Message-ID <[email protected]>
From:             principe dot borodin at gmail dot com
Operating system: Ubutntu 15.10
PHP version:      Irrelevant
Package:          PHP Language Specification
Bug Type:         Bug
Bug description:On Create a constructor

Description:
------------
I received the error


igor@nt-pronon06:/var/www/html/testes$ php interface.php 
PHP Catchable fatal error:  Argument 1 passed to MeToo::meToo() must
implement interface Key, none given, called in
/var/www/html/testes/interface.php on line 32 and defined in
/var/www/html/testes/interface.php on line 22
PHP Stack trace:
PHP   1. {main}() /var/www/html/testes/interface.php:0
PHP   2. MeToo->meToo() /var/www/html/testes/interface.php:32

The php5 Still considers method with same class name as class
constructor? Its was in php4?

I'm using php 5.6.11

Test script:
---------------
https://gist.github.com/IgorDePaula/e0d20c4528318dbbebb75661d9d0f4b5

Expected result:
----------------
None error given

Actual result:
--------------
igor@nt-pronon06:/var/www/html/testes$ php interface.php 
PHP Catchable fatal error:  Argument 1 passed to MeToo::meToo() must
implement interface Key, none given, called in
/var/www/html/testes/interface.php on line 32 and defined in
/var/www/html/testes/interface.php on line 22
PHP Stack trace:
PHP   1. {main}() /var/www/html/testes/interface.php:0
PHP   2. MeToo->meToo() /var/www/html/testes/interface.php:32

-- 
Edit bug report at https://bugs.php.net/bug.php?id=74583&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74583&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74583&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74583&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74583&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74583&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74583&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74583&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74583&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74583&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74583&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74583&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74583&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74583&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74583&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74583&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74583&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74583&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74583&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74583&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74583&r=mysqlcfg