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

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Sep 5 10:53:13 CEST 2007


Oliver Hader schrieb:
> Hi Masi,
> 
> Martin Kutschker schrieb:
>> Oliver Hader schrieb:
>>> 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.
>> Did you profile also "foreach ($array as &$key => &$value)"?
>>
>> Most loops don't modify the loop arguments and so refernces could be
>> used. That is if, they are faster.
> 
> The expression "foreach ($array as &$key => &$value)" would mean:
> * $value =& $array[$key]
> * But where would the $key reference point to?
> 
> Anyway I tried this and got the following:
> "Fatal error: Key element cannot be a reference"

Sorry, was reference happy. Forget the keys and have a look at the values :-)

Masi


More information about the TYPO3-team-core mailing list