Re: Are '...' faster than "..." in normal code? Single Quotes vs. Double Quotes
| From: | Joe Stump | Date: | Mon, 04 Dec 2000 22:31:23 +0000 |
| Subject: | Re: Are '...' faster than "..." in normal code? Single Quotes vs. Double Quotes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28653@lists.php.net to get a copy of this message | ||
I'm sure we'll all get flamed over this one, but it is my understanding that
' is faster than "
--Joe
On Tue, Dec 05, 2000 at 08:21:59AM +1000, Matthew M. Boulter wrote:
> Heya gang,
>
> we all know the standard thing with string, "..." are parsed '...'
> are not parsed.
>
> Now I might be a scrooge for cpu cycles but this got me thinking, if this *always* the case?
> For example if I declare a function
>
> function myFunc($param1 = "default", $param2 = 'default') {...}
>
> Does the Zend engine parse $param1 looking to substitute values, and when it looks at $param2,
> being in 'single quotes' it simply assigns the value.
>
> ---------------------------------------
> So, in a class declaration, what is faster (yes I'm being pedantic, but the cycles add
> up)
> var $czHostName = "foohost.com";
> var $czClassName = "someClass";
> or
> var $czHostName = 'foohost.com';
> var $czClassName = 'someClass';
> ---------------------------------------
> The same goes for array indexing
> $parameters["HostName"]
> or
> $parameters['HostName']
>
>
> This isn't a big issue, I'm just intrigued?
>
> Any help?
> ---------------------------------------
> Matthew M. Boulter.
> myCybrary Development Office.
> The University of Queensland Library.
> Brisbane, Australia, 4062.
> ---------------------------------------
-----
Joe Stump, PHP Hacker
joestump98@yahoo.com
http://www.miester.org/
Need a programmer? http://www.google.com/search?q=%22Joe+Stump%22
*****************************************************************
* RENT THIS SPACE - SEEN BY THOUSANDS EACH DAY! *
* Current Sponsor: http://www.smackdown.com
*
*****************************************************************