[TYPO3-core] RFC: Feature Request 6037: Performance tunning in t3lib_div by removing elderly PHP functions
Oliver Hader
oh at inpublica.de
Mon Feb 18 16:31:00 CET 2008
FYI: Committed to SVN TYPO3_4-2 (rev. 3216)
olly
Oliver Hader schrieb:
> 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/
More information about the TYPO3-team-core
mailing list