Re: Re: is_int/is_numeric possible bug
| From: | Gareth Ardron | Date: | Tue, 29 Nov 2005 17:42:10 +0000 |
| Subject: | Re: Re: is_int/is_numeric possible bug | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20849@lists.php.net to get a copy of this message | ||
Matteo Beccati wrote:
Gareth Ardron wrote: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.Ron Korving wrote: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 ;)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.