Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14230 invoked by uid 1010); 4 Jan 2008 01:11:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14214 invoked from network); 4 Jan 2008 01:11:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 01:11:09 -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:52060] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/F9-20810-CA78D774 for ; Thu, 03 Jan 2008 20:11:09 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Jan 2008 03:11:05 +0200 Received: from [192.168.16.90] ([192.168.16.90]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 3 Jan 2008 17:11:02 -0800 Message-ID: <477D87A6.7040705@zend.com> Date: Thu, 03 Jan 2008 17:11:02 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Alain Williams CC: Markus Fischer , internals@lists.php.net References: <200801031903.01980.tomi@cumulo.fi> <1199380881.15292.11.camel@sbarrow-desktop> <20080103172813.GQ7861@mint.phcomp.co.uk> <477D2B40.9010302@fischer.name> <477D2CDB.3000005@zend.com> <20080104004706.GX7861@mint.phcomp.co.uk> In-Reply-To: <20080104004706.GX7861@mint.phcomp.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jan 2008 01:11:02.0311 (UTC) FILETIME=[AC3D0B70:01C84E6E] Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: stas@zend.com (Stanislav Malyshev) > You aren't making it a strict static typed language. All that you are doing > is saying that at certain points (function entry) that the values are checked > and converted to certain types. If within the fuction an argument hinted as > integer is used in a string context, the juggling will still happen. So it's basically another way to say (string)? Again, that's not what was said by other people discussing it. But all that just to save one (string) inside function? > What you are doing to allowing the function author to protect the integrity > of his code without having to resort to a regex/... to check what the arguments are. If you need regex, you'd still have to use regex. Type juggling can do only so much. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com