#35715 [Opn->Bgs]: Incompatibility in reference handling
| From: | messju at lammfellpuschen dot de | Date: | Fri, 16 Dec 2005 20:48:57 +0000 |
| Subject: | #35715 [Opn->Bgs]: Incompatibility in reference handling | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-90579@lists.php.net to get a copy of this message | ||
ID: 35715
User updated by: messju at lammfellpuschen dot de
Reported By: messju at lammfellpuschen dot de
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
PHP Version: 5CVS-2005-12-16 (CVS)
New Comment:
sorry, I just learned here:
http://www.php.net/manual/en/language.references.pass.php
that the result always was undefined.
Previous Comments:
------------------------------------------------------------------------
[2005-12-16 21:41:37] messju at lammfellpuschen dot de
Description:
------------
When an assingment is passed as a function argument that is expected to
be passed by reference, an E_STRICT message is thrown: "<b>Strict
Standards</b>: Only variables should be passed by reference" and the
reference is lost.
This was not the case in 5.1.1
Reproduce code:
---------------
function foo(&$a) {
$a = 1;
}
foo($a = 0);
var_dump($a);
Expected result:
----------------
int(1)
Actual result:
--------------
int(0)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35715&edit=1