[TYPO3-core] RFC: Feature Request 6037: Performance tunning in t3lib_div by removing elderly PHP functions
Steffen Kamper
steffen at sk-typo3.de
Sat Feb 16 13:59:27 CET 2008
"Oliver Hader" <oh at inpublica.de> schrieb im Newsbeitrag
news:mailman.1.1203165238.11791.typo3-team-core at lists.netfielders.de...
> Hi,
>
> unfortunately this RFC got of my view and is here since August 2007.
> I've created a new patch which now works again with current "Trunk"
> (TYPO3_4-2 branch). Please test and review the patch, thus we might get
> this into TYPO3 4.2. Thanks!
>
> olly
>
>
> Oliver Hader schrieb:
>> This is a SVN patch request.
>>
>> Problem:
>> There are some old-styled PHP functions in t3lib_div which could be done
>> in a better way nowadays. Those among are:
>> * while(list($k, $v)=each($arr)) --> foreach ($arr as $k => &$v)
>> * strstr($haystack, $needle) --> strpos($haystack, $needle)
>>
>> Solution:
>> Use the mentioned PHP functions to get a better performance.
>> Use references in foreach loops for a better performance (requires
>> PHP5), but this is the requirement for TYPO3 4.2 - thus, it's okay.
>>
>> Comments:
>> Thanks to Popy for creating the initial patch on this issue.
>> I left the function t3lib_div::trimExplode() untouched because there's
>> already a RFC created by Wolfgang/Masi on this list.
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=6037
>>
>> Branch: Trunk only
> --
> Oliver Hader
> http://inpublica.de/
>
Hi olly,
thx for rewriting the patch, +1 on reading and (testing). I applied the
patch and there is no error at all, but didn't had a specific test case.
vg Steffen
More information about the TYPO3-team-core
mailing list