Re: Single quotes VS. Double quotes
| From: | George Schlossnagle | Date: | Fri, 13 Dec 2002 16:40:29 +0000 |
| Subject: | Re: Single quotes VS. Double quotes | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92459@lists.php.net to get a copy of this message | ||
What version of php did you try this with Brian? There were some lexer changes implemented (that I believe are only in HEAD for ZE1 and ZE2 and not in 4.3) that should equalize this difference. There was a thread about this on php-dev not long ago that explains why this occurs - search the archives for ZEND_ADD_STRING.
George
On Friday, December 13, 2002, at 11:35 AM, Andrey Hristov wrote:
See this : http://phpxpath.sourceforge.net/benchmark/phpBench.php And show it to the guy. Andrey ----- Original Message ----- From: "Brian Moon" <brianm@dealnews.com> To: <php-dev@lists.php.net> Sent: Friday, December 13, 2002 6:29 PM Subject: [PHP-DEV] Single quotes VS. Double quotesThis is of really low importance, but I found it interesting. A new guyonthe Phorum dev team decided to convert all double quotes to single quotes for "speed" in CVS. The common assumption is that single quotes arefasterthan double quotes. However, I am of the mind set of using double alwaysasit creates less headaches later to add a variable to the string. In an attempt to show him the marginal savings of this, I did some benchmarks. The results were confusing. $var="This is test number $x"; was really slow. but, $var="This is test number ".$x; and $var='This is test number '.$x; we basically identical. Andi, Zeev, if you want waste some energy on exanding on why this is andifanything in ZE2 will change it I would find it a good read. Brian Moon dealnews.com -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php