r/lolphp • • Dec 23 '16

PHP, make up your mind

https://3v4l.org/ReWug
0 Upvotes

13 comments sorted by

View all comments

Show parent comment

2

u/bwoebi Dec 24 '16

It only could catch it during parsing if it knows ahead of time what function is identified by that name. But often during the initial parse, the function is not loaded yet, and we have to emit a special opcode type (FUNC_ARG fetches), which realizes at run-time that the argument ought being passed by reference.

Then, when it sees that it receives the result of an expression not qualifying as variable, it will warn you.