Re: use of curly braces with string interpolation.
| From: | Jochem Maas | Date: | Wed, 12 Jan 2005 18:08:42 +0000 |
| Subject: | Re: use of curly braces with string interpolation. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206226@lists.php.net to get a copy of this message | ||
Marek Kilimajer wrote:
Jochem Maas wrote:DOH! nice one Marek, will make an attempt to 'bash' a script together asap (I'm crap at shell scripting! but the challenge is a good one). thanks for the heads up. thinking about what you said, dumping some test code inside an exec() call would have the same effect, no?hi guys,I always use curly braces around vars placed in double quoted strings, I do this for 2 reasons: 1. I believe It helps the engine because the var delimitation is explicit, and this means the interpolation is (should be?) faster. 2. it looks nice (easier to read!) I have tried to test this with a simple script that does a million interations - but I cannot get it to return consistent results - one time with curlies is faster, another its slower.The difference happens at parse time, so if you want to measure any difference execute php script in a loop, not loop inside php script.