[TYPO3-core] RFC: Feature Request 6037: Performance tunning in t3lib_div by removing elderly PHP functions

Oliver Hader oh at inpublica.de
Mon Sep 3 14:02:05 CEST 2007


Hi Michael,

Michael Stucki schrieb:
>> Furthermore references are a bit faster if working with arrays, e.g.
>> $tca =& $GLOBALS['TCA']['tt_content']['columns']['bodytext']
>> is faster than using it without reference, e.g.
>> $tca = $GLOBALS['TCA']['tt_content']['columns']['bodytext'].
>>
>> If found other recources on the web which state that
>> "while(list(,$value)=each($array))" would be faster than calling
>> "foreach ($array as $value)". But I could not reproduce this with PHP5
>> and the profiler of the PEAR extension "Benchmark".
>>
>> I've created a new patch. See attachment.
> 
> Hmm. Hard to test, but I tried:
> http://localhost/quickstart/typo3/index.php
> => redirects me to http://localhost3opyt/tratskciuq//alt_main.php

Oh, oh... thanks! ;)
A reference operator "&" was missing in revExplode(). I checked again
all changed foreach calls for these referencing things and fixed the
behaviour you pointed out.

> Additionally, I noticed that line 385 of the patch will make the application
> fail, so please delete it.

This line was added accidentally while reviewing the patch again before
posting to the list, sorry.


olly
-- 
Oliver Hader
http://inpublica.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006037_v3.patch
Type: text/x-patch
Size: 19821 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070903/dc16c30f/attachment-0001.bin 


More information about the TYPO3-team-core mailing list