The usage of quotation mark in script PHP very often we meet, maybe can be every script that we make existed the usage of quotation mark referred.

In PHP the usage of quotation mark differentiated between single quotation mark and double quote. This Difference is made not without meaning and its use each can we apply in a script PHP we so it’s make script PHP we become quicker execute its.

Single Quotation mark
Use single quotation mark just for strings that not existed variable in it, so strings that produced among quotation mark referred is same precisely by what written.

example:
$str_cat = 'cat';
echo '$str_cat'; // the result fixed $str_cat

Variable $str_cat untranslated by PHP as the variable in single quotation mark.

Double quote
Use double quote just for strings that existed variable in it, so variable in it will be translated in front by PHP so strings that released is end result from existing strings together variable that has been translated.

example:
$str_cat = 'cat';
echo "$str_cat"; // the result becomes cat

Nevertheless often we too engross use this double quote even in it not existed variable that must translated, so it’s make script we longer execute its are compared to if we use quotation mark in ‘more’ correctness. Such as those which already I explain above, that double quote will confiscate longer time even only so much milisecond, nevertheless if request to script that has reached hundreds of every second remain to be just will come into question. So, now start familiarize to differentiate the usage of quotation mark referred as so our PHP scripts can be more efficient and thrift to computer resource get with it.