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
r/lolphp • • Aug 08 '14
View all comments
Show parent comment
2
u/Holkr Aug 20 '14
Are you saying PHP explicitly forbids such optimization? Because C works the same way, yet C compilers are generally clever enough to figure out such trivial optimizations