Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28311 invoked by uid 1010); 29 Nov 2005 17:57:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 28293 invoked from network); 29 Nov 2005 17:57:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2005 17:57:10 -0000 X-Host-Fingerprint: 67.154.202.210 ip67-154-202-210.z202-154-67.customer.algx.net Received: from ([67.154.202.210:20703] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 1D/3D-14828-2769C834 for ; Tue, 29 Nov 2005 12:57:07 -0500 To: internals@lists.php.net Date: Tue, 29 Nov 2005 12:57:01 -0500 Reply-To: ben.litton@gmail.com References: <438C7A4C.9090503@fission.org.uk> <8E.A3.14828.D718C834@pb1.pair.com> <438C8E07.7050206@fission.org.uk> <438C91AC.5050305@beccati.com> <438C92F2.4010802@fission.org.uk> <004a01c5f50d$e0dce4c0$e6d41a44@stumpy> Organization: BioInformatics Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera M2/8.51 (MacPPC, build 2182) X-Posted-By: 67.154.202.210 Subject: Re: [PHP-DEV] Re: is_int/is_numeric possible bug From: ben.litton@gmail.com ("Ben Litton") On Tue, 29 Nov 2005 12:53:47 -0500, "Sara Golemon" wrote: >> is_numeric will test if it's a numeric string. Maybe is_int should do >> the same, but apparently it doesn't. >> > What on earth for? > If you want content, do is_numeric(). If you want type, do is_int().... > Simple. > > -Sara PHP lets you get away without worrying about types often enough that people slip up on this. I don't know if most PHP users care if the value of a variable is a "4" or a 4 but yes, it's easy enough to get around. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/