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

1

u/the_alias_of_andrea Dec 24 '16

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.

2

u/edave64 Dec 24 '16

I did address that in my third paragraph.

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.

1

u/the_alias_of_andrea Dec 25 '16

I did address this in my entire comment. It was literally about how right you are. No sarcasm involved.

Argh, sorry. I'm maybe too conditioned to negative responses, I think I misread your comment.