Monday, 28 October 2013

PHP single quote and double quote mistakes done by the programmer

1. Single quotes, double quotes

It’s easy to just use double quotes when concatenating strings because it parses everything neatly without having to deal with escaping characters and using dot values. However, using single quotes has considerable performance gains, as it requires less processing.

 Consider this string:
Ex:-
$howdy = 'everyone';   
# $foo = 'hello $howdy';  
$bar = "hello $howdy"

No comments:

Post a Comment