end(array_keys(array(0)))
says PHP Strict standards: Only variables should be passed by reference
( http://3v4l.org/CNLVT )
end((array_keys(array(0))))
on the other hand, just works ( http://3v4l.org/168fi ). Why?
The VLD decompiler shows the same opcodes being ran the only difference is in the ext
column but I can't find documentation on what that means.
What's likely happening is array_keys
is passing the result back by reference. As such, PHP is throwing you a notice that you shouldn't do that.
Wrapping in parenthesis actually changes the reference and forces PHP to evaluate the statement inside first. As such, it removes the reference. One of those weird things that doesn't look like it makes a difference but actually does.
More on the weirdness here http://phpsadness.com/sad/51
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With