Propor usage of double and single quotes?

Posted by Phox on Stack Overflow See other posts from Stack Overflow or by Phox
Published on 2010-03-11T19:32:09Z Indexed on 2010/03/11 19:34 UTC
Read the original article Hit count: 199

Filed under:
|
|

I'm talking about the performance increase here. From all I know you can echo variables in double quotes ("), like so:

<?php

echo "You are $yourAge years old";

?>

But single quotes will just return You are $yourAge years old. But what about performance differences? I've always gone by the rule that single quotes are faster because the PHP interpreter doesn't have to search through the string for variables. But I'm seeing more and more blog and forum posts on the web saying differently.

Does anyone actually have any information on this subject? Perhaps benchmark tests or something?

Cheers.

© Stack Overflow or respective owner

Related posts about php

Related posts about quotes