Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95519 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18757 invoked from network); 31 Aug 2016 13:50:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2016 13:50:12 -0000 Authentication-Results: pb1.pair.com header.from=dave@mudsite.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dave@mudsite.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mudsite.com designates 209.85.217.174 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.217.174 mail-ua0-f174.google.com Received: from [209.85.217.174] ([209.85.217.174:33687] helo=mail-ua0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/A6-11399-490E6C75 for ; Wed, 31 Aug 2016 09:50:12 -0400 Received: by mail-ua0-f174.google.com with SMTP id l94so89330851ual.0 for ; Wed, 31 Aug 2016 06:50:12 -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=Hjr/EGWvXBrbh9LxC3+V4yeFQBkTo++ZsYGOCIPvg2k=; b=0oROhZNcd4E+J9bmAw/RTLLR6tnVZOVuSQQdpwRmV8n+CCkbKhZPtRRU8/PypixuoB EH0BWaDhqtsDWeU5P1SHLZtwDxMS5bxGM21/8u3yKXOkOc1zRYhAz+eELff1jKg8TBN2 HpeGPVMbGG26P4cNGAc0omnhNQMlsBRNcZrnHzh3RuPGsB9c/zHy2v1BsOLHlLmTpvX1 s+XXjEhIQ8x8JxI/0lqZeCJHlXiktiyGsHlE+3/kySH0KZ0DtHvfDR3/oe7nEIWjUejG HC/E6Ndbu8MoVAkp30/wHeWK4bi2ifT20p+4glUdiKpzRxWiKyVqe4Y9Ztg9bNjHzLuf 1etg== 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=Hjr/EGWvXBrbh9LxC3+V4yeFQBkTo++ZsYGOCIPvg2k=; b=T0dnikslUiJFKX7iMMb9ZSFkBA3iOJT8x+oka4vQ+yYBc1ET0pHCNSqztDt8Kq9Kfe qsMPjDXRVC+g5BPhqvKYGBGTZJ8kaq08pWZm6FCZ364YMBxFvsD6wwm9d/aL+d9udgU0 2H6mcKxTLv9ts3QG9xTO0YP7TBad202Y96vxPW6AHZWfOMLL8TnAJhd6x+aAApIomYJe Cbri2rY/1s7utzLfwweHWSTJT2aTjgB4HqS9uFeuBRVD1xCxlIwbPCg/6OFQnaUK3RVU ZGoIBEin9BAIjZJ/2EsgUW9vLBUnoxhhZZnnUx07twnx+blAjUtiu4Jzju8Lt4CMBFXs R1yQ== X-Gm-Message-State: AE9vXwOYTReSm5WQkE4OIPumRAvvZkKc77CmQvDXNFEcGAyNuM72e9o0NM9GM9qbprwnyTo2YfG5ng/yniPApA== X-Received: by 10.31.178.11 with SMTP id b11mr5687221vkf.72.1472651409481; Wed, 31 Aug 2016 06:50:09 -0700 (PDT) MIME-Version: 1.0 References: <1e6cac8a-e1af-c9e7-a900-a2efda0771dd@gmx.de> In-Reply-To: Date: Wed, 31 Aug 2016 13:49:59 +0000 Message-ID: To: "Christoph M. Becker" , Dmitry Stogov , Marco Pivetta Cc: PHP Internals List , Nikita Popov Content-Type: multipart/alternative; boundary=001a11430d0423fc4f053b5e608d Subject: Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess From: dave@mudsite.com (David Walker) --001a11430d0423fc4f053b5e608d Content-Type: text/plain; charset=UTF-8 On Wed, Aug 31, 2016 at 7:48 AM David Walker wrote: > 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. >> > >> > Apologies in advance for the toppost. Gmail is the bane of my existence in regards to mailing lists. --001a11430d0423fc4f053b5e608d--