Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77123 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71939 invoked from network); 9 Sep 2014 23:30:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2014 23:30:56 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.115 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.115 smtp115.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.115] ([108.166.43.115:54304] helo=smtp115.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/27-08634-EAD8F045 for ; Tue, 09 Sep 2014 19:30:55 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp7.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id F240538031C; Tue, 9 Sep 2014 19:30:51 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp7.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 8B3BB3802E6; Tue, 9 Sep 2014 19:30:51 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.10); Tue, 09 Sep 2014 23:30:51 GMT Message-ID: <540F8DAA.5090202@sugarcrm.com> Date: Tue, 09 Sep 2014 16:30:50 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Andrea Faulds , Robert Stoll CC: "internals@lists.php.net" References: <004d01cfcc63$e7e3ac40$b7ab04c0$@tutteli.ch> <3DB7DEC9-2F99-4DDB-95A9-70455E4BABCB@ajf.me> In-Reply-To: <3DB7DEC9-2F99-4DDB-95A9-70455E4BABCB@ajf.me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] make casts more strict in PHP 7 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > No, no it would not. PHP’s 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. I agree. If the developer explicitly states they want conversion, it should be conversion. For implicit casts, some tightening may be ok, but for explicit ones I think it would bring much more headaches than it's worth. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/