Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37095 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29055 invoked from network); 17 Apr 2008 17:26:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 17:26:17 -0000 Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 208.70.128.77 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 208.70.128.77 smtp-gw51.mailanyone.net Received: from [208.70.128.77] ([208.70.128.77:43295] helo=smtp-gw51.mailanyone.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/8A-05127-63887084 for ; Thu, 17 Apr 2008 13:26:15 -0400 Received: from mailanyone.net by smtp-gw51.mailanyone.net with esmtpsa (TLSv1:RC4-MD5:128) (MailAnyone extSMTP sam@sambarrow.com) id 1JmXs9-0001xb-8c; Thu, 17 Apr 2008 12:26:09 -0500 To: Chris Stockton Cc: Stanislav Malyshev , Felipe Pena , internals@lists.php.net In-Reply-To: References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> <48077BD2.2000107@zend.com> <48078168.1070801@zend.com> <1208452308.6148.3.camel@sbarrow-desktop> Content-Type: text/plain Date: Thu, 17 Apr 2008 13:23:46 -0400 Message-ID: <1208453026.6148.14.camel@sbarrow-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: sam@sambarrow.com (Sam Barrow) On Thu, 2008-04-17 at 10:23 -0700, Chris Stockton wrote: > On Thu, Apr 17, 2008 at 10:11 AM, Sam Barrow > wrote: > Actually, is_numeric checks for strings that contain numeric > values, > it's not the same as is_bool, is_int, is_float, etc, which > check the > variable's type. > Hence my second example = ) > > > Your point is very valid for is_int and similar functions, > just not > is_numeric(). I just did a grep on zend framework for is_int > and there > were tons of results. > I think it is valid for anything, numeric type hinting is very > appropriate in php. Numeric type hinting is valid, all I'm saying is that PHP's is_numeric function doesn't perform a strict type check like is_int or is_bool. I agree with you I just think you misunderstood the purpose of the is_numeric function.