Re: Back to Basics - Why Use Single Quotes?
| From: | Eric Butera | Date: | Thu, 31 Jul 2008 13:07:17 +0000 |
| Subject: | Re: Back to Basics - Why Use Single Quotes? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277526@lists.php.net to get a copy of this message | ||
On Wed, Jul 30, 2008 at 7:03 PM, mike <mike503@gmail.com> wrote:
> On 7/30/08, Stephen <stephen-d@rogers.com> wrote:
>
>> But I wonder, is there any reason to use single quotes?
>
> extremely minor performance gains, afaik.
>
> probably moreso when doing $foo["bar"] and $foo['bar']
>
> but i believe it's negligible $foo = 'bar' and $foo = "bar"
>
> sara golemon did some performance tests with actual opcode results here:
>
> http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I read one of Ilia's presentation slides saying this was a myth.
Strings probably aren't the bottleneck.