[TYPO3-core] RFC #15020: Enhancement of t3lib_div::testInt

Michiel Roos [netcreators] michiel at netcreators.com
Tue Jul 6 23:45:05 CEST 2010


This is an SVN patch request.

Type: Speed enhancement

Bugtracker references: http://bugs.typo3.org/view.php?id=15020

Branches:
- trunk

Problem:
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.

Solution:
Use the PHP function is_int.

-- 
Met vriendelijke groet / Warm regards,

Michiel Roos
Chief Technical Officer
Netcreators: Open Source, Open Minds, Open People
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 15020_testInt_v1.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100706/d2da8a0f/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15020_testInt_test_v1.php
Type: text/php
Size: 906 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100706/d2da8a0f/attachment-0001.bin>


More information about the TYPO3-team-core mailing list