Bug #23113
closedEnhancement of t3lib_div::testInt
0%
Description
t3lib_div::testInt can be optimized by making use of the PHP version of testInt called: is_int.
This function is still used in the core: 129 times.
A speed gain from ~ 45 - 81 % can be achieved on this function.
In addition to changing this function to use is_int, all calls to t3lib_div::testInt should be replaced by is_int.
I don't see the point of calling a special function just to call a single function inside.
(issue imported from #M15020)
Files
Updated by Dmitry Dulepov over 14 years ago
As discussed in the core list. is_int() is not the same as t3lib_div::testInt(). Therefore the issue is set as "won't fix".
Note that using is_numeric() is not an option either because is_numeric(' 5') will return true while t3lib_div::testInt() will return false.
Updated by Steffen Kamper over 14 years ago
Committed patch an test to svn
4_4 rev 8585
trunk rev 8586