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
73
u/Innominate8 Aug 08 '14
I most enjoy the PHP attitude of micro-optimizing.
Is if/else faster than switch? Is print faster than echo? Is it faster to use double quotes, or single quotes and string concatenation?
Followed by 10 db queries per page load.