Edit report at https://bugs.php.net/bug.php?id=55754&edit=1
ID: 55754 Updated by: s...@php.net Reported by: dk at uw dot no Summary: Only variables should be passed by reference for ZEND_SEND_PREFER_REF params -Status: Open +Status: Closed Type: Bug Package: Scripting Engine problem PHP Version: 5.3.8 -Assigned To: +Assigned To: stas Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-10-16 00:34:01] s...@php.net Automatic comment from SVN on behalf of stas Revision: http://svn.php.net/viewvc/?view=revision&revision=318137 Log: Bug #55754 - Only variables should be passed by reference for ZEND_SEND_PREFER_REF params ------------------------------------------------------------------------ [2011-09-21 12:46:04] dk at uw dot no Description: ------------ Built-in functions where a parameter is defined with ZEND_SEND_PREFER_REF raises a Strict Standards warning if an expression is passed as the argument. The PREFER part signals the preference of passing by reference, but if the argument is not a variable, it should behave as if the parameter was defined with ZEND_SEND_BY_VAL and keep quiet, just as for regular ZEND_SEND_BY_VAL parameters. Test script: --------------- <?php error_reporting(32767); current($arr = array(0 => "a")); /* Strict Standards: ... */ current(array(0 => "a")); current($arr); ?> Actual result: -------------- Strict Standards: Only variables should be passed by reference in filename on line 5 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55754&edit=1