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

Oliver Hader oh at inpublica.de
Sun Aug 19 13:49:40 CEST 2007


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


olly
-- 
Oliver Hader
http://inpublica.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006037.patch
Type: text/x-patch
Size: 27376 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070819/ee96a6e5/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006037_w.patch
Type: text/x-patch
Size: 26076 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070819/ee96a6e5/attachment-0003.bin 


More information about the TYPO3-team-core mailing list