Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34495 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85751 invoked by uid 1010); 5 Jan 2008 00:39:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85733 invoked from network); 5 Jan 2008 00:39:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2008 00:39:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=brianm@dealnews.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=brianm@dealnews.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain dealnews.com designates 129.41.69.185 as permitted sender) X-PHP-List-Original-Sender: brianm@dealnews.com X-Host-Fingerprint: 129.41.69.185 smtp.dealnews.com Linux 2.5 (sometimes 2.4) (4) Received: from [129.41.69.185] ([129.41.69.185:37035] helo=smtp.dealnews.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/90-14872-9B1DE774 for ; Fri, 04 Jan 2008 19:39:25 -0500 Received: (qmail 15962 invoked from network); 5 Jan 2008 00:32:33 -0000 Received: from unknown (HELO mail.dealnews.com) (10.1.1.7) by -H with ESMTPS (DHE-RSA-AES256-SHA encrypted); 5 Jan 2008 00:32:33 -0000 Received: (qmail 20247 invoked from network); 5 Jan 2008 00:32:33 -0000 Received: from h61.27.91.75.ip.alltel.net (HELO macdough.local) (brianm@[75.91.27.61]) (envelope-sender ) by mail.dealnews.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 5 Jan 2008 00:32:33 -0000 Message-ID: <477ED01F.3090300@dealnews.com> Date: Fri, 04 Jan 2008 18:32:31 -0600 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Andi Gutmans CC: Sam Barrow , Ilia Alshanetsky , Stas Malyshev , internals Mailing List References: <477DB7BF.10201@chiaraquartet.net> <20080104105558.GC7861@mint.phcomp.co.uk> <477E5649.2080104@chiaraquartet.net> <477E619C.2050107@sektioneins.de> <477E78D0.3050501@zend.com> <698DE66518E7CA45812BD18E807866CE01103ED3@us-ex1.zend.net> <1199472536.15292.185.camel@sbarrow-desktop> <698DE66518E7CA45812BD18E807866CE01103EE2@us-ex1.zend.net> In-Reply-To: <698DE66518E7CA45812BD18E807866CE01103EE2@us-ex1.zend.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] type hinting From: brianm@dealnews.com (Brian Moon) Andi Gutmans wrote: > Look it boils down to the following: > > True type enforcement ala === (i.e. you pass "1" to an int and it errors > out) does not make sense for PHP (and yes, philosophy and design goals > of the language are important). > > What I suggested in my previous email is type hinting which also does > the conversion to the request type. This is very much in the PHP > spirit and also how PHP's internal functions work today. It is > "consistent". I agree (and did last time) with Andi about this. I am all for using a == instead of === for type hinting scalars. This will mean any scalar will pass as a string, but arrays and objects will not. -- Brian Moon Senior Developer ------------------------------ When you care enough to spend the very least. http://dealnews.com/