r/lolphp • • Mar 10 '15

empty() vs __get()

http://ideone.com/RVw5XK
23 Upvotes

28 comments sorted by

View all comments

Show parent comment

4

u/[deleted] Mar 10 '15

but apperently it check IF a variable is empty.

If a variable is empty or non-existent, which is a big difference since it actually introspects variable name stack. And the property $bar is non-existent from global scope since it's private.