[TYPO3-core] RFC #15020: Enhancement of t3lib_div::testInt
Dmitry Dulepov
dmitry at typo3.org
Thu Jul 8 12:34:54 CEST 2010
Hi!
Christian Futterlieb wrote:
> Following version of testInt would be much faster, and react (IMO)
> correct on above problem.
>
> function testInt ($var) {
> if (is_numeric($var)) {
> return (int) $var == $var;
> }
> return FALSE;
> }
This uses two returns while CGL explicitly states that only a single return
is allowed...
This is not a -1 but a note.
--
Dmitry Dulepov
TYPO3 core&security teams member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/
More information about the TYPO3-team-core
mailing list