Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77119 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59454 invoked from network); 9 Sep 2014 20:19:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2014 20:19:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:58230] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/75-08634-0D06F045 for ; Tue, 09 Sep 2014 16:19:28 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 0493E8C0080; Tue, 9 Sep 2014 16:19:26 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DrST-ddsA_P4; Tue, 9 Sep 2014 16:19:25 -0400 (EDT) Received: from oa-res-27-90.wireless.abdn.ac.uk (oa-res-27-90.wireless.abdn.ac.uk [137.50.27.90]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 84B158C0081; Tue, 9 Sep 2014 16:19:23 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <004d01cfcc63$e7e3ac40$b7ab04c0$@tutteli.ch> Date: Tue, 9 Sep 2014 21:19:21 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <3DB7DEC9-2F99-4DDB-95A9-70455E4BABCB@ajf.me> References: <004d01cfcc63$e7e3ac40$b7ab04c0$@tutteli.ch> To: Robert Stoll X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] make casts more strict in PHP 7 From: ajf@ajf.me (Andrea Faulds) On 9 Sep 2014, at 20:26, Robert Stoll wrote: > Personally, I do not like such inconsistencies either but I like that = the > conversion rules in Andrea's RFC are more strict. And thus I was = asking > myself if it would not make sense to change the current behaviour of > castings and make them more strict in PHP 7. No, no it would not. PHP=92s explicit casts cannot fail, and there is = absolutely no good reason to change this. If people want strict casting, = we can add new functions or operators for that specifically. But to = break explicit casts and make them sometimes fail would cause = innumerable bugs and backwards-compatibility ideas. -- Andrea Faulds http://ajf.me/