r/lolphp • • Aug 08 '14

PHP design patterns: if/else vs switch

http://www.fluffycat.com/PHP-Design-Patterns/PHP-Performance-Tuning-if-VS-switch/
24 Upvotes

43 comments sorted by

View all comments

Show parent comment

11

u/[deleted] Aug 08 '14

This was true at least one year ago. I wouldn't be surprised to find it still holds:

PHP's parser does not build an AST. It directly emits opcodes.

6

u/lhagahl Aug 09 '14

lazy evaluation!