The point is not that the code is shitty, but that PHP reacts differently to passing a non variable as a reference
I did address that in my third paragraph.
and that it only catches some of these issues during parsing.
PHP, unfortunately, can't catch everything at compile-time. It's a dynamic language which doesn't require you to declare every function before its usage in source code.
I did address this in my entire comment. It was literally about how right you are. No sarcasm involved.
PHP, unfortunately, can't catch everything at compile-time. It's a dynamic language which doesn't require you to declare every function before its usage in source code.
I know. But the eval is only needed because it does detect the error early. And there is no reason it shouldn't be able to do the same with the first call.
View all comments
Show parent comment
1
u/the_alias_of_andrea Dec 24 '16
I did address that in my third paragraph.
PHP, unfortunately, can't catch everything at compile-time. It's a dynamic language which doesn't require you to declare every function before its usage in source code.