$foo= 'dudes';
$bar= 'whats up';
<?php echo 'hey,'.$foo.' '.$bar.'?'; ?>
<?php echo "hey, $foo $bar?"; ?>
is
<span style="color:#993333">
<?php echo "hey, $foo $bar?"; ?>
</span>
slower than
<span style="color:#339933">
<?php echo 'hey,'.$foo.' '.$bar.'?'; ?>
</span>
?
Yes. It is slightly faster to use single quotes.
This is because when you use double quotes PHP has to parse to check if there are variables in there.
Speed difference in using inline strings vs concatenation in php5?