Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58311 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22224 invoked from network); 29 Feb 2012 00:20:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2012 00:20:11 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:55472] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/52-36673-A3F6D4F4 for ; Tue, 28 Feb 2012 19:20:10 -0500 Received: by vcbfo14 with SMTP id fo14so2301221vcb.29 for ; Tue, 28 Feb 2012 16:20:07 -0800 (PST) Received-SPF: pass (google.com: domain of tjerk.meesters@gmail.com designates 10.52.240.177 as permitted sender) client-ip=10.52.240.177; Authentication-Results: mr.google.com; spf=pass (google.com: domain of tjerk.meesters@gmail.com designates 10.52.240.177 as permitted sender) smtp.mail=tjerk.meesters@gmail.com; dkim=pass header.i=tjerk.meesters@gmail.com Received: from mr.google.com ([10.52.240.177]) by 10.52.240.177 with SMTP id wb17mr15760561vdc.63.1330474807656 (num_hops = 1); Tue, 28 Feb 2012 16:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=s0olxk4GOTAMBMFXaFaZN+LAAcZiNuo7SjA3k1u8bdo=; b=sa8pc73PCC5aE3cEX/F8sjQDLx5wKL5FWHFkT2rzwdeKg8ZHPtwGDVf+5UmfElGQSd US/622SeaPMDBTVVHjT/7mWj3mosKeGiMt0Nkc01a0vk5fshQcvh56Knh6uKGTfqhUxI qDoYA5/pGYZqWvFq9Zxh/IoIYXQ6N9BVzsNig= MIME-Version: 1.0 Received: by 10.52.240.177 with SMTP id wb17mr13025777vdc.63.1330474807074; Tue, 28 Feb 2012 16:20:07 -0800 (PST) Sender: tjerk.meesters@gmail.com Received: by 10.52.28.243 with HTTP; Tue, 28 Feb 2012 16:20:06 -0800 (PST) In-Reply-To: References: <1330357150.2159.30.camel@guybrush> <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> Date: Wed, 29 Feb 2012 08:20:06 +0800 X-Google-Sender-Auth: RfvuQOlODfhhSJcsnyrOcFIBWB0 Message-ID: To: Michael Morris Cc: 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: datibbaw@php.net (Tjerk Anne Meesters) On Wed, Feb 29, 2012 at 7:08 AM, Michael Morris wr= ote: > Agreed. =A0If 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. =A01 =3D=3D "1" so who cares? > int $a =3D 'House'; // error 0 !=3D 'House', so this is a problem. Actually, 0 =3D=3D 'House' ;-) > > Again, errors should only raise if the final value !=3D source value. > > On Tue, Feb 28, 2012 at 6:03 PM, Rick WIdmer = wrote: >> On 2/28/2012 2:58 PM, Kris Craig wrote: >> >>> strong int $a =3D "1"; // Converts to 1. =A0May or may not throw an err= or (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 >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 -- Tjerk