Re: [PEPr] +1 for XML::XML_Feed_Parser

From: Date: Sun, 23 Oct 2005 10:29:50 +0000
Subject: Re: [PEPr] +1 for XML::XML_Feed_Parser
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40257@lists.php.net to get a copy of this message
Justin Patrin wrote:
http://www.procata.com/blog/archives/2005/03/08/microbenchmarks-of-single-and-double-qouting/
This link is useless in this context. This person shows that literals are basically the same. This is known. Then they *mention* that they could try the other possibilities but they don't. As I said before, I *have* tried the other possibilities (I used both normal execution and eval() to test different possibilities) and "string $var" was consistently quite a bit slower than 'string '.$var. Others have mentioned that the same is true. But since you won't believe our experience I've written a whole new script which uses 'time' to time the runs: http://pear.reversefold.com/strings/index.php I forgot to mention that it is the comments from ilia about opcodes that is interesting :)
As far as I can see Coding Standards do not say you should use concatenation over inlining, end of the story. Some arguments were given in favor of the former, in the end the developer decides which form to use.
And may I point out that I *always* say that I *prefer* single quotes, not they the developer *must* use them. And I have never said that you did :) All is well !
Arnaud.

« previous php.pear.dev (#40257) next »