Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34376 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95577 invoked by uid 1010); 4 Jan 2008 00:24:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95562 invoked from network); 4 Jan 2008 00:24:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 00:24:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=tomi@cumulo.fi; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=tomi@cumulo.fi; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cumulo.fi from 81.228.11.120 cause and error) X-PHP-List-Original-Sender: tomi@cumulo.fi X-Host-Fingerprint: 81.228.11.120 pne-smtpout3-sn1.fre.skanova.net Solaris 10 (beta) Received: from [81.228.11.120] ([81.228.11.120:51380] helo=pne-smtpout3-sn1.fre.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/17-20810-3AC7D774 for ; Thu, 03 Jan 2008 19:24:03 -0500 Received: from [192.168.1.3] (84.250.46.16) by pne-smtpout3-sn1.fre.skanova.net (7.3.129) (authenticated as kaisto-9) id 474FCCB000193E02 for internals@lists.php.net; Fri, 4 Jan 2008 01:23:06 +0100 Organization: Cumulo Studio To: internals@lists.php.net Date: Fri, 4 Jan 2008 02:21:27 +0200 User-Agent: KMail/1.9.7 References: <200801031903.01980.tomi@cumulo.fi> <200801040151.59810.tomi@cumulo.fi> <477D78C7.2080304@zend.com> In-Reply-To: <477D78C7.2080304@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200801040221.27494.tomi@cumulo.fi> Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: tomi@cumulo.fi (Tomi Kaistila) > 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? Ohh gee wiz... Well odds are that you would not want the value to increase by zero, when the intention was to increase with anything but zero. Would type hinting help? Well, it would efficiently assure that the value passed into it was a number and thus the resulted would not get screwed because we assumed PHP's type juggling would save the day. Honestly Stanislav, do you even care or read what people write to or is it your intension only to knit-pick and and be a thicky? Here is the short version for you. Yes, we all agree that there are existing workarounds to having scalar values typed hinted. Just like we could have workarounds for the missing OO features in PHP 4? This does not invalidate the need for either feature. Tomi Kaistila PHP Developer