Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17093 invoked from network); 31 Aug 2016 13:48:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2016 13:48:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=dave@mudsite.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dave@mudsite.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mudsite.com designates 209.85.217.178 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.217.178 mail-ua0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:34946] helo=mail-ua0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/46-11399-820E6C75 for ; Wed, 31 Aug 2016 09:48:24 -0400 Received: by mail-ua0-f178.google.com with SMTP id i32so89026634uai.2 for ; Wed, 31 Aug 2016 06:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mudsite-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MYFs6c5EPPbDRAfbzT+3+PhDSivKY/7mO5wpetTocXU=; b=pMlGnLBb21blq8TVgJyUHqALPBOjugVAGBRGgPekcD8S0FgyiCq4bnwioc1H2LNUzX p4aw1/kifEC7533RfVZJDy2qURMWmo6I2xwm5Qa/ygd5gbunsDL/x0P9ck9fNaOzNDTv wSudEygP9aHmWGXKeQjc6GOzVO455ibwJZqe8YnJta0VgPUElJeJMEbxIJn6BmCQben8 0qAeOwwGBKRN9WHDBwaqdHxVcswDlQipZIgjhydVOCTXBR4b9iyaao8zkNOJHtderAJP /PNRO0cSw1xR4LMc6yhLkYYZ48VSzfbZH1ke+hboc9INHr4ImkqqnIQL6oA26Lykt8xg 6XUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MYFs6c5EPPbDRAfbzT+3+PhDSivKY/7mO5wpetTocXU=; b=AAuvGYjdeZrVYCWMXyRHSfe0JmAvMkCEDwW7eAxX69bl/tPM1vi2lAY1VgwWkLDEey hFLvID/EPh9XjhOESGDIxH+Y6aNtO5O80/j5xKh3JpEijXHSeGvCfC7BvCG6IFT+oG6R Jt8R92LPpWjdLdtG+g9csaXXboBFzPhiQu8r3CpBrYxnI7dJhqKNSo8y28ziteSGttXb rjQ/psPWOsrErMiTxu0ZNiJFcYNlWsgwpNfCN/xWvRAjzwGb67fJ6fwVa4KRgZz1/3bh P7pt3U94P05N+H9q68seIx4Pk5jKl6hgS7Q/aMIf6DRviBhvbbUUHs56V1HBmzmwNq3O n6VQ== X-Gm-Message-State: AE9vXwPu2uMskgCqr+3UpwFlIi8aov4kTaA/MZr3HR4pG4TMmd5yUriIqTIBojpIusaDq352uMHsducnDVluaQ== X-Received: by 10.176.82.249 with SMTP id w54mr5410103uaw.98.1472651301581; Wed, 31 Aug 2016 06:48:21 -0700 (PDT) MIME-Version: 1.0 References: <1e6cac8a-e1af-c9e7-a900-a2efda0771dd@gmx.de> In-Reply-To: Date: Wed, 31 Aug 2016 13:48:10 +0000 Message-ID: To: "Christoph M. Becker" , Dmitry Stogov , Marco Pivetta Cc: PHP Internals List , Nikita Popov Content-Type: multipart/alternative; boundary=94eb2c18f38ab5886c053b5e59c7 Subject: Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess From: dave@mudsite.com (David Walker) --94eb2c18f38ab5886c053b5e59c7 Content-Type: text/plain; charset=UTF-8 I too get Dmitry's result. As the left hand side is an error-zval, and the right hand is null, it explodes. Yes, the hackish way I try and resolve things was to check opcodes around the current one, which I should have thought in the case of addition wouldn't have been valid. The entire goal of the RFC was to prevent warning for obvious results (as it specifies on long string of accesses). One, thought about and ignored by me, aspect to the RFC was the concept of a null entity. Wherein any array access on null would result with null. I believe this could result in resolving many of the headaches I'm attempting to resolve by managing a null-return from array access as a literal null, or unknown cast to null. On Wed, Aug 31, 2016 at 4:36 AM Christoph M. Becker wrote: > On 31.08.2016 at 12:10, Dmitry Stogov wrote: > > > no. if you would try the proposed PR with this code, you would see: > > > > > > Fatal error: Uncaught Error: Unsupported operand types > > I get the following behavior against PR #1269: > > $ sapi/cli/php -n -d error_reporting=-1 -r "\$a = [null]; \$c = null; > var_dump(\$a[0][0] + \$c[0]);" > > Notice: Trying to get index of a non-array in Command line code on line 1 > > Notice: Trying to get index of a non-array in Command line code on line 1 > int(0) > > Cheers! > > > ________________________________ > > From: Marco Pivetta > > Sent: Wednesday, August 31, 2016 10:10:23 AM > > To: Dmitry Stogov > > Cc: Christoph M. Becker; PHP Internals List; Nikita Popov; David Walker > > Subject: Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container > read-adccess > > > > > > Hi Dmitry, > > > > On 31 Aug 2016 8:37 a.m., "Dmitry Stogov" dmitry@zend.com>> wrote: > >> > >> I vote NO, because the implementation introduces more problems than > intents to fix. > >> > >> For example the following code starts to throw exception: > >> > >> > >> > > > > Isn't that the point of this RFC? > > I would expect this code to only ever work by accident. > > > --94eb2c18f38ab5886c053b5e59c7--