RE: [SMARTY] Re: Bugfixes and some other stuff...
| From: | Internet Racer | Date: | Mon, 15 Jul 2002 02:12:08 +0000 |
| Subject: | RE: [SMARTY] Re: Bugfixes and some other stuff... | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5314@lists.php.net to get a copy of this message | ||
won't it be even faster if you had:
echo 'This is a test: ' . $string . "\n";
-----Original Message-----
From: Monte Ohrt [mailto:monte@ispi.net]
Sent: July 14, 2002 12:41 PM
To: Andrei Zmievski
Cc: Norbert Röcher; smarty-general@lists.php.net
Subject: Re: [SMARTY] Re: Bugfixes and some other stuff...
Simple test:
$string = "test me";
echo "This is a test: " . $string . "\n"; --> repeated 100000 times,
1.768 seconds
echo "This is a test: $string\n"; --> repeated 100000 times, 3.294 seconds
Andrei Zmievski wrote:
>On Sun, 14 Jul 2002, Norbert Röcher wrote:
>
>
>>Writing something like:
>>echo 'test: '.$test;
>>is about 10% slower than
>>echo "test: $test";
>>
>>So this can't be said generally.
>>
>>
>
>Eh, no. In the first scenario PHP does not have to interpolate variables
>inside the string, so it is faster than the second one.
>
>-Andrei
>http://www.gravitonic.com/
>* The future is not what it used to be. *
>
>
>
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php