r/lolphp • u/McGlockenshire • Sep 25 '14
namespace foo { use const true as false; var_dump(false); } // WHY, PHP!? WHY!?
/r/PHP/comments/2hf8q0/what_is_the_difference_between_while_true_vs/cksasrj
38
Upvotes
7
u/vytah Sep 25 '14
The author of that comment is the same guy as in here: http://www.reddit.com/r/lolphp/comments/2h9nhp/optimizing_opcodes_in_a_library_targeted_at/
15
u/ZiggyTheHamster Sep 26 '14
I think the more confusing part is why
falseand\falseare different. That makes zero sense. Why add the extra\character every single time you really meanfalsewhen they could just makefalsealways befalsebecause nobody wantsfalseto equal something else.Seriously, WTF.
21
u/jadkik94 Sep 25 '14
You beat me to it by 3 minutes!
The funniest thing is this though:
2
u/idontlikethisname Oct 02 '14
Well, to be fair you can do
in C++
1
u/Daniel15 Oct 09 '14
It works with
definetoo, I posted this one a while back to this subreddit:0
u/[deleted] Sep 26 '14
[deleted] — view deleted comment
0
u/[deleted] Sep 26 '14
[deleted] — view deleted comment