Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34375 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92764 invoked by uid 1010); 4 Jan 2008 00:07:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92748 invoked from network); 4 Jan 2008 00:07:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 00:07:42 -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:37643] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/96-20810-DC87D774 for ; Thu, 03 Jan 2008 19:07:42 -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 02:07:38 +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 16:07:34 -0800 Message-ID: <477D78C7.2080304@zend.com> Date: Thu, 03 Jan 2008 16:07:35 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Tomi Kaistila CC: internals@lists.php.net References: <200801031903.01980.tomi@cumulo.fi> <200801032359.11029.tomi@cumulo.fi> <477D64C7.9000200@zend.com> <200801040151.59810.tomi@cumulo.fi> In-Reply-To: <200801040151.59810.tomi@cumulo.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jan 2008 00:07:34.0818 (UTC) FILETIME=[CECBB820:01C84E65] Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: stas@zend.com (Stanislav Malyshev) > $n2 is a string value of the number one. What happens if, during a more > complex computation an incorrect value is store to $n2, lets say an > alphabetic character? > The value would be interpreted as a zero and the result would be wrong. If you change data, result changes - surprise! If you set $n2 to 42, result would be wrong too, if by right you mean $n2 being 1 and not 42. How it has anything to do with static typing? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com