Edit report at https://bugs.php.net/bug.php?id=63994&edit=1
ID: 63994
Comment by: bobwei9 at hotmail dot com
Reported by: ahmetdevel at umich dot edu
Summary: assignment in function call argument does not
workaround reference limitation
Status: Open
Type: Bug
Package: Compile Warning
Operating System: windows8
PHP Version: 5.4.10
Block user comment: N
Private report: N
New Comment:
Duplicate of #63862.
Previous Comments:
------------------------------------------------------------------------
[2013-01-15 18:42:59] ahmetdevel at umich dot edu
Description:
------------
Introducing a dummy variable assignment in function arguments where a reference
is
expected should be a reasonable workaround for the limitation that only
variables
can be passed as reference. But, it causes a StrictStandards warning.
Separating it into two statements:
$dummy=0; foo($dummy);
of course works.
Test script:
---------------
<?
function foo(&$a){
}
foo($dummy=0);
Expected result:
----------------
No warning.
Actual result:
--------------
Strict Standards: Only variables should be passed by reference in .. on line 4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63994&edit=1