#40111 [Opn->Csd]: call-time pass by reference is either ambiguous or wrong.
| From: | tony2001@php.net | Date: | Mon, 15 Jan 2007 10:04:49 +0000 |
| Subject: | #40111 [Opn->Csd]: call-time pass by reference is either ambiguous or wrong. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107605@lists.php.net to get a copy of this message | ||
ID: 40111
Updated by: tony2001@php.net
Reported By: colder@php.net
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 5.2.0
New Comment:
This bug has been fixed in CVS.
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:
------------------------------------------------------------------------
[2007-01-12 16:57:11] colder@php.net
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 this bug report at http://bugs.php.net/?id=40111&edit=1