Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37111 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77592 invoked from network); 17 Apr 2008 18:43:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 18:43:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:50467] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/B4-05127-0D997084 for ; Thu, 17 Apr 2008 14:41:32 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Apr 2008 21:42:02 +0300 Received: from [192.168.16.217] ([192.168.16.217]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Apr 2008 11:41:59 -0700 Message-ID: <480799C9.9030803@zend.com> Date: Thu, 17 Apr 2008 11:41:13 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Paul Biggar CC: Felipe Pena , internals@lists.php.net References: <1208404255.5665.34.camel@pena> <480782BE.8050608@zend.com> <4807955B.5010602@zend.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Apr 2008 18:41:59.0125 (UTC) FILETIME=[B7FD4850:01C8A0BA] Subject: Re: [PHP-DEV] [RFC] Type hints (parameter and return value) From: stas@zend.com (Stanislav Malyshev) Hi! > is_* are the important functions, since they are the ones which most > resemble the type hints under discussion. Up until now, anyone Circular argument here. > implementing this in user-land would use is_int(). It makes perfect No, you shouldn't do that - there's absolutely no reason to accept 1 and reject '1', unless you have some very rare and special circumstance. If you are using is_int for that, your code is wrong. > sense that type hints should mimic this behaviour. Not doing so would > be very inconsistent, and so confusing. Could we stop using word "consistent" to replace "I like it"? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com