Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95577 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69192 invoked from network); 2 Sep 2016 15:28:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2016 15:28:27 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:61980] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/8B-19490-89A99C75 for ; Fri, 02 Sep 2016 11:28:25 -0400 Received: from [192.168.2.103] ([79.243.115.246]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M4GND-1apFhb3pP1-00rlcC; Fri, 02 Sep 2016 17:28:17 +0200 To: David Walker , Dmitry Stogov , Marco Pivetta References: <1e6cac8a-e1af-c9e7-a900-a2efda0771dd@gmx.de> Cc: PHP Internals List , Nikita Popov Message-ID: <7eb5f710-b34d-743a-3563-4e74e5995d41@gmx.de> Date: Fri, 2 Sep 2016 17:28:34 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:J3jKQCymCGxqczhGL57PgknFA+DZnclF1YJ8kXxnv3cyli8h6XS AG6Cxb8qP0BLK+HM3YUjL1Jt2YGzHkZmHh5aM4zkeyW4XsQIJVRKxIl1iwc9ko/ryxZ0xX8 a4lNvAdqEksWzjPTadMomK0U6tTCwHVu6Gefn83MVHGAg5L//3ll4xcBa1AP+CEOR/DwdBh KrWI8a5KYExMNFLyYi8GQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:pCD4Bp0Ev4s=:yF29aeXnznjoPdLJ6yo9B1 wku9yCrw3sBlQJOK0kyzXWEMgdoyPhFguSkfkNSe6DD/aj3y5/oMZ4H/iQxUBuD9QqlHEytYc XDZO6xTVHyvuC6S+EL0WH/MTSaZALfWY5+2d9PATeZ5LGBVzBwK/zvgV2tQ7SHREP5kRjHExI tf/DaSZwOwbbAoG4kdqK5vTwKtM/tHo7KPJmtELpM7Yqshk9+6D3pzHr9am18bNU71UTSBmEQ m/KBZ+NrZ1eILcD/VHJmGyuPu046xqGfXJpK297g1XIJCyKWJebpDtLhSQWTyP+EdJTQV6RaN +RcG9RWi0OxmwrXkJfMcCI89Pa/9TUL8xWOYW2BScnMVnS0KA5PjGpcVbqbStD/BGh6LrJGde dmZU+DS5+mueyQqgOKN4C+9FVBtO5asj+oy691RCbpkKiIrYHMbqoQh6rg4r1AhRieLMnj7lP +gUO5aY3Jwsc3tKJS6qKW/Xjzomh/J2sNHAdMnTgnF+aUXAM/JAiyeI9B84c6cfMa6iusbPVB 8IP9zA7XElHejiRnNBLx4dJJ5mr0Dpq6BA170HcJ8JHbsZ9Du26VExWB1pQEOUqpxB2ZHtjNL umF6t/wd0MHD36wJgEFY138mycs5oMRULR5AVx3e+NpwBz2VPJt+0mtIzKOLxoD4Lb2+18+s7 gfhfrbn3zPE+Nc63AK1bPsugyIAArUoJDz0Anl6NpdKmO7ox83dTPni6y0xGERDkF5ruwRnfr QZVl0NoVGYbFZ12LPG26v70wxh0P1rGNiK9nhUQ1S69CSX8Vqi4s57A61POsarNhu5gJbYK94 Axd2xPx Subject: Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess From: cmbecker69@gmx.de ("Christoph M. Becker") On 02.09.2016 at 16:57, David Walker wrote: > Poking around, I'm must not be understanding how TICK opcodes would > negatively impact the lookahead. It may be my newness, but the way I'm > reading the compilation of ZEND_AST_DIM, would not be suspect to random > TICK opcodes from impacting the lookahead. I see that for a single > ZEND_AST_DIM, compilation will recuse emitting all the FETCH_DIM_R opcodes > for it in succession. Whereafter, a subsequent call to zend_compile_stmt() > will emit the TICK if it was declared. It could also be that I'm unsure > what a test example would be that could inject the TICK into the middle, of > the DIM compilation. > > The same applies to the BEGIN/END silence, as they will be wrapped around > the entire compilation of the DIM opcodes. [1] has an example using both > ticks and silencing, which seems to work as intended emitting a single > warning (for the un-silenced access) > > I'm not exactly sure what you mean by debugging-opcodes here though, > however, unless someone is hooking into the compilation and compiling DIM's > in a different way, I don't see the inherent problems with the lookahead. > > I was thinking about the use of an exception, however, I think that'd be a > pretty significant shift. It would also be very odd that this case would > be the exception throwing one, whereas accessing via reference wouldn't, or > any of the undefined indexes wouldn't. It would also impact most user code > out there by needing to wrap variable array access in a try{}catch, which > would be imposing a pretty large change to php 8.0. That's why I didn't > really think shifting to an exception would be appropriate here. > > Thanks > -- > Dave > > [1] - https://gist.github.com/bp1222/18d80e8ec962eba1ba75c99124191a0a I don't understand why we're even trying to hack this, let alone considering to throw an exception. Why don't we handle array dereferencing just like property access, which also might throw multiple notices, see . If this is considered too much of a BC break for 7.2, we still could postpone that change to 8.0. -- Christoph M. Becker