Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91664 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42106 invoked from network); 15 Mar 2016 00:32:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2016 00:32:50 -0000 X-Host-Fingerprint: 176.248.189.170 unknown Received: from [176.248.189.170] ([176.248.189.170:16226] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BB/E2-20120-03857E65 for ; Mon, 14 Mar 2016 19:32:48 -0500 Message-ID: To: internals@lists.php.net References: <56E6A761.8070005@zend.com> Date: Tue, 15 Mar 2016 00:32:43 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 176.248.189.170 Subject: Re: Remove useless opcode handlers From: ajf@ajf.me (Andrea Faulds) Hi, Nikita Popov wrote: > What I mean is, for example: > > var_dump(~(bool)true); > echo "Done\n"; > > Will throw an exception without opcache, will result in no output (and no > *visible* error) with opcache. My point here is that const-operand-only > cases might be necessary to handle error cases like this. It hasn't passed yet, but I think it's worth bringing up this RFC of mine here: https://wiki.php.net/rfc/invalid_strings_in_arithmetic It would require CONST-CONST to be valid for all arithmetic operations, in order to trigger a E_NOTICE/E_WARNING at runtime for certain (admittedly unlikely) cases. Thanks. -- Andrea Faulds https://ajf.me/