Matteo Beccati wrote:
Gareth Ardron wrote:

Ron Korving wrote:

Just out of curiosity, to which versions does this apply?


5.1.0b3->5.1.1 at least. Haven't got anything older to test on.


As far as I know request variables have always been strings, and is_int() checks the variable type, not its content.

I wonder how your code was previously working ;)

It wasn't, I was just helping a mate do something. New code.

But still, it seems very odd to me - I mean, why does is_numeric() therefore work when is_int() doesn't - that seems like strange logic to me (though I admit I'm not the most logical of people).

I just don't see the need to have to do:

if (is_numeric($_REQUEST['var']) && is_int($_REQUEST['var'])) {

when, at least in my mind, is_int() should do the job by itself.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to