Edit report at http://bugs.php.net/bug.php?id=54310&edit=1

 ID:                 54310
 Comment by:         jinmoku at hotmail dot com
 Reported by:        nicholas dot j dot miller at gmail dot com
 Summary:            Class Method & Function Arguments are allowed to be
                     named the same
 Status:             Open
 Type:               Bug
 Package:            *Compile Issues
 Operating System:   ANY
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

see 

http://bugs.php.net/bug.php?id=43512


Previous Comments:
------------------------------------------------------------------------
[2011-03-19 03:59:22] nicholas dot j dot miller at gmail dot com

Description:
------------
When writing class method and function declarations, php allows multiple


parameters with the same name. This seems like something that should
produce a 

warning or notice.

Test script:
---------------
class Foo

{

    public function bar($param, $param) {

       echo $param;

    }

}





$foo = new Foo();

$foo->bar('param1', 'param2');

Expected result:
----------------
I feel as though this should produce a warning or notice.

Actual result:
--------------
Runs without any issues and echos 'param2'


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54310&edit=1

Reply via email to