#40111 [NEW]: call-time pass by reference is either ambiguous or wrong.

From: Date: Fri, 12 Jan 2007 16:57:11 +0000
Subject: #40111 [NEW]: call-time pass by reference is either ambiguous or wrong.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107544@lists.php.net to get a copy of this message
From: colder@php.net Operating system: Irrelevant PHP version: 5.2.0 PHP Bug Type: Scripting Engine problem Bug description: call-time pass by reference is either ambiguous or wrong. Description: ------------ "Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If ..." But the argument is still passed by reference. I believe the error message doesn't reflect the way it works and should for that reason be updated. The modification I propose can be found here: http://patches.colder.ch/zend_compile-1.647.2.27.2.26.patch?markup Reproduce code: --------------- function foo(&$a){$a++;}; function bar($a){$a++;} $val1 = 1; foo(&$val1); echo $val1."\n"; //2 $val2 = 1; bar(&$val2); echo $val2; //2 -- Edit bug report at http://bugs.php.net/?id=40111&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40111&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40111&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40111&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40111&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40111&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40111&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40111&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40111&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40111&r=support Expected behavior: http://bugs.php.net/fix.php?id=40111&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40111&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40111&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40111&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40111&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40111&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40111&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40111&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40111&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40111&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40111&r=mysqlcfg

« previous php.bugs (#107544) next »