Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20849 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13725 invoked by uid 1010); 29 Nov 2005 17:40:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13710 invoked from network); 29 Nov 2005 17:40:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2005 17:40:51 -0000 X-Host-Fingerprint: 81.103.221.49 mta09-winn.ispmail.ntl.com Solaris 8 (1) Received: from ([81.103.221.49:4090] helo=mta09-winn.ispmail.ntl.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BF/FA-14828-2A29C834 for ; Tue, 29 Nov 2005 12:40:50 -0500 Received: from aamta09-winn.ispmail.ntl.com ([81.103.221.35]) by mta09-winn.ispmail.ntl.com with ESMTP id <20051129174045.JNWA8609.mta09-winn.ispmail.ntl.com@aamta09-winn.ispmail.ntl.com>; Tue, 29 Nov 2005 17:40:45 +0000 Received: from [192.168.0.21] (really [81.106.214.135]) by aamta09-winn.ispmail.ntl.com with ESMTP id <20051129174045.RHGS1233.aamta09-winn.ispmail.ntl.com@[192.168.0.21]>; Tue, 29 Nov 2005 17:40:45 +0000 Message-ID: <438C92F2.4010802@fission.org.uk> Date: Tue, 29 Nov 2005 17:42:10 +0000 User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matteo Beccati CC: internals@lists.php.net References: <438C7A4C.9090503@fission.org.uk> <8E.A3.14828.D718C834@pb1.pair.com> <438C8E07.7050206@fission.org.uk> <438C91AC.5050305@beccati.com> In-Reply-To: <438C91AC.5050305@beccati.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: is_int/is_numeric possible bug From: gareth@fission.org.uk (Gareth Ardron) 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.