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

 ID:                 43512
 Updated by:         [email protected]
 Reported by:        alkoholex at gmail dot com
 Summary:            same parameter name can be used multiple times in
                     method/function definition
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        *
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-02-18 00:24:52] [email protected]

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=308443
Log: - Fixed bug #43512 (same parameter name can be used multiple times
in method/function definition)

------------------------------------------------------------------------
[2007-12-12 10:28:49] [email protected]

Good catch. I can reproduce this with any current CVS/released versions.

------------------------------------------------------------------------
[2007-12-06 09:08:44] alkoholex at gmail dot com

Description:
------------
The PHP-Parser doesn't recognise if a parameter with the same name is
given over two times (no warning / error). In this case it was a
copy-paste mistake, but it causes big troubles in our system.

Reproduce code:
---------------
class myCls extends otherCls {



     private function myFunc($var, $var) {

        //do something          

     }

}

Expected result:
----------------
A Warning should occur. Something like "Multible use of
variable/parameter name in function myFunc".

Actual result:
--------------
Nothing. The second parameter replaces the value of the first.

If you don't give over an second parameter, the value of the first is
nonsence or empty.


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



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

Reply via email to