[TYPO3-core] RFC: #2302: substitute all strtoupper/strtolower with the t3lib_div-method

Steffen Kamper steffen at sk-typo3.de
Fri Jun 27 17:40:29 CEST 2008


"Peter Niederlag" <peter at niederlag.de> schrieb im Newsbeitrag 
news:mailman.10557.1214577044.4573.typo3-team-core at lists.netfielders.de...
> Hi,
>
> Steffen Kamper schrieb:
>> Hi,
> [...]
>> Problem: strtoupper and strtolower are not multibyte-safe. For this 
>> reason
>> we added 2 methods in t3lib_div sometime ago.
>
> Are you sure? That's not what the manual states! http://php.net/strtoupper
>
>> Now all calls in core to the native strtoupper/strtolower-functions 
>> should
>> use these functions in t3lib_div instead.
>
> Just to give some impression I did a quick check of time measuremant:
>
> // native 500 loops ~0.005
> // t3lib_div::wrapper 500 loops ~0.001
>
> // native 5000 loops ~0.04
> // t3lib_div::wrapper 5000 loops ~0.09
>
> The wrapper seems to take twice the time. IMO it should be used only
> were needed! Is this surely needed everywhere?
>
> Greets,
> Peter
> -- 

Hi Peter,

when i look to your measurement, it shows that it becomes slower by more 
looping. First loop even was faster.

Anyway i have to restart it and decide where it's necessary and where not, 
not an easy task by ~500 occurances.
At the end, if strtoupper fails while t3lib_div::strtoupper doesn't fail 
this seems be more important.

vg Steffen 




More information about the TYPO3-team-core mailing list