php - Why doesn't end(( )) throw a strict notice? -
this question has answer here:
end(array_keys(array(0)))
says php strict standards: variables should passed reference
( http://3v4l.org/cnlvt )
end((array_keys(array(0))))
on other hand, works ( http://3v4l.org/168fi ). why?
the vld decompiler shows same opcodes being ran difference in ext
column can't find documentation on means.
what's happening array_keys
passing result reference. such, php throwing notice shouldn't that.
wrapping in parenthesis changes reference , forces php evaluate statement inside first. such, removes reference. 1 of weird things doesn't makes difference does.
more on weirdness here http://phpsadness.com/sad/51
Comments
Post a Comment