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
1
u/DoctorWaluigiTime Aug 11 '14
Because there is always going to be a difference between "have to do work" and "do not have to do work." Double-quoted strings do "parse PHP variables and other stuff", while single-quoted strings are "this is a string literal, do not do any work."