This is a discussion on please comment closing of bug#35995 within the PHP General forums, part of the PHP Programming Forums category; hi! before reporting a similar bug again, i would like to discuss what other users / developers think about this bug: ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi!
before reporting a similar bug again, i would like to discuss what other users / developers think about this bug: http://bugs.php.net/bug.php?id=35995 function(&$test){...} test($test = 0); this is an extreme helpful syntax, but the above code worked in all versions of php4 and php5 except php5.1.2. the developers say, this is not a bug in php5.1.2, because it should have never worked in older version, too. ok, i understand: $test = 0 is an expression, that cannot be passed by reference. but why not interprete it as follows: 1. assign $test to 0 2. pass $test by reference too function test it only depends order of execution. i think: this bug should not be closed, but fixed, because it breaks BC! we use this syntax widly in our company. i would change it, but finding the locations in the source code is extreme difficult, because you cannot find all occurences by regex. if you understand the semantics of the above syntax the way i described above, it is very useful! what do you think? thanks, - rainer |