Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58306 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4958 invoked from network); 28 Feb 2012 23:08:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2012 23:08:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmgx.michael@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmgx.michael@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: dmgx.michael@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:38911] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/DE-36673-A8E5D4F4 for ; Tue, 28 Feb 2012 18:08:59 -0500 Received: by werh12 with SMTP id h12so2077332wer.29 for ; Tue, 28 Feb 2012 15:08:56 -0800 (PST) Received-SPF: pass (google.com: domain of dmgx.michael@gmail.com designates 10.180.79.229 as permitted sender) client-ip=10.180.79.229; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dmgx.michael@gmail.com designates 10.180.79.229 as permitted sender) smtp.mail=dmgx.michael@gmail.com; dkim=pass header.i=dmgx.michael@gmail.com Received: from mr.google.com ([10.180.79.229]) by 10.180.79.229 with SMTP id m5mr43229235wix.6.1330470536200 (num_hops = 1); Tue, 28 Feb 2012 15:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=5rMqbp2lkmQKQDvH2gXgq4+HGnG4itjpQ6DS2N/K/Xw=; b=O4kaZAqYSIF7eL5mMVyioCBojBZGKeR/VCo6urMtKzxDcf27LAU9fYa1fJPciZyuKn yMwMNWiwA7RKY4d2Sl19HRzd2+epOvd4H+TMRsC4MdFGhOk2a87sEsA/UFRXZwuZzpOG a/6OYCAKBvXSa2VrR9He+wm/9ZpYVGFaSDcXs= MIME-Version: 1.0 Received: by 10.180.79.229 with SMTP id m5mr34374252wix.6.1330470536132; Tue, 28 Feb 2012 15:08:56 -0800 (PST) Received: by 10.216.30.149 with HTTP; Tue, 28 Feb 2012 15:08:55 -0800 (PST) In-Reply-To: <4F4D5D44.5090307@developersdesk.com> References: <1330357150.2159.30.camel@guybrush> <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> Date: Tue, 28 Feb 2012 18:08:55 -0500 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Scalar type hinting From: dmgx.michael@gmail.com (Michael Morris) Agreed. If conversion can occur without data loss (that is, if the value being assigned is =3D=3D the value that actually IS assigned) then no error should occur. So int $a =3D "1"; // no error. 1 =3D=3D "1" so who cares? int $a =3D 'House'; // error 0 !=3D 'House', so this is a problem. Again, errors should only raise if the final value !=3D source value. On Tue, Feb 28, 2012 at 6:03 PM, Rick WIdmer wr= ote: > On 2/28/2012 2:58 PM, Kris Craig wrote: > >> strong int $a =3D "1"; // Converts to 1. =A0May or may not throw an erro= r (I'm >> still on the fence). > > > It this is an error, it is no longer PHP. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >