Edit report at https://bugs.php.net/bug.php?id=64755&edit=1

 ID:                 64755
 Updated by:         paj...@php.net
 Reported by:        eth at ethaniel dot com
 Summary:            Only variables should be passed by reference
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Debian 7.0
 PHP Version:        5.4.14
 Block user comment: N
 Private report:     N

 New Comment:

See www.php.net/array_pop.

Using: array_pop(array_keys($a)); array_keys($a) is an expression while 
array_pop 
expects a variable. ($k = array_keys($a);...).


Previous Comments:
------------------------------------------------------------------------
[2013-05-02 08:03:55] eth at ethaniel dot com

Description:
------------
I get a "PHP Strict Standards:  Only variables should be passed by reference 
in" 
error where there should be none.

Test script:
---------------
echo array_pop(array_keys(array("erwre")));

Expected result:
----------------
Result: 0.

Actual result:
--------------
The script returns the result (0), but also a "PHP Strict Standards:  Only 
variables should be passed by reference in" in my error log.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64755&edit=1

Reply via email to