[TYPO3-dev] [TYPO3-core] New TYPO3 Coding Guidelines

Vladimir Podkovanov admin at sitesfactory.ru
Fri Jul 10 03:13:46 CEST 2009


Ernesto Baschny [cron IT] wrote:
> 
> My tests show this on my environment (PHP 5.2.0 with eaccelerator):
> 
> $a = 'test2';
> 
> 100.00%  $tmp = 'test ' . $a;
> 105.64%  $tmp = "test $a";
> 174.98%  $tmp = sprintf('test %s', $a);
> 180.87%  $tmp = str_replace('#a#', $a, 'test #a#');
> 
> Slight difference. Isn't worth a change, as the first one is the most
> "readable" one. I also like the "template-based" sprintf, but it
> shouldn't be used if you are going to loop through it 50.000 times. :)
> 
> Cheers,
> Ernesto

Thanks :)

-- 
-rgds-
Vladimir




More information about the TYPO3-dev mailing list