Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86091 invoked from network); 9 Jun 2015 12:35:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2015 12:35:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:53680] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/13-00828-2ADD6755 for ; Tue, 09 Jun 2015 08:35:47 -0400 Received: from [192.168.0.100] ([95.89.139.132]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MV30j-1YYoTv1kqr-00YTo1; Tue, 09 Jun 2015 14:35:22 +0200 Message-ID: <5576DD88.9090304@gmx.de> Date: Tue, 09 Jun 2015 14:35:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Matt Wilmas , Yasuo Ohgaki CC: Stanislav Malyshev , internals@lists.php.net References: <5576051A.3040800@gmx.de> <55760771.6020802@gmail.com> <778F345F9918474AB8CAAB03082ECBF7@pc1> <5576CC2E.8080908@gmx.de> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:105umxDYSkQJMf/7SDh7BAV6DycyMvEE1UcqCB4I/8AdcHITCBf 8xRahabeq/CUZCHOTGjiU8gVlW9Y516QQpV5PjDEId+2DuuhBOIXE6ERLegmtV53+TYcb0h eYBaPLZ8BfjtgGWkILHdO5XR3DmD0UOYWcHVKlCtaZEmFgoGqvaOX4vy7eor6G/nnQGcn97 fMskJcWDME1d7FEyFfCsA== X-UI-Out-Filterresults: notjunk:1;V01:K0:GvyZnCn5ewE=:JQCpS7s8pQEZUmi7i4NhoK sfJlpjZ+HH73EgV9vPnKiNiryKvAvA5fZmn1S2nwQOJyF8eEReh5qNJfvSSNH8jWjL52Ij0Bo uAJqIHiBaQRA/Wu7FVHBmTFHNcQMr2bQGdf8s4rQvGPE2WGETTSRoKX7KseSH952M862Qduih lSTpU3recHMUVFd3MH428bKi3YdF5gTXDiF4ubqLXj9z05cvzH6FjrRyw3PFrRoj+pcdM6Iph tTG/9v0BDuXT6Mrah4emrrAuN3UN8/H69HIyjlYiK33SDVb+1tE8xk9LefgBgR3qRwMAlHxxx mbJPpRi9lAomW3Iqo1nROXnloIuLDfKF5zObnuywdVCXTlLeg6IhKCVlCoWkE2bS74ZqWxGWT I3EDFhI0JfIlDjp0jb5TD4egk+oRwuIo01aPUbDpi3I1lr930WnxJW9Z/T5tVJP05W1SxZfMr MD3yIK8xCiEwa9RrvJ04W/1XaRKWzRMMVYWamq2STRZC+IHvo6cQIHbZDX0sk/ZAY4tAYKGCp sn9KKeqqvYpWzPkREvRcDQyVIv2CEGcZIqlrn0c0Sqf2no64tX1IKtJB8Qkw55G/o/Av1ftK8 /cVTrwwR3z6ByVkhIF2F6A7YLGqYCR90+LeUFl90Ibs24DrYoTe77SC8yR8qf1m6UrlNvgZbS KArsGX3KAtD5IMuDFCBYoKwdKNY6hIILnj1mk9YD1sjENzV2W/OhfDRR46sNRzkKw9zU= Subject: Re: [PHP-DEV] Array dereferencing of scalars From: cmbecker69@gmx.de (Christoph Becker) Matt Wilmas wrote: > Forgetting the NULL case for a sec... With: > > $v = []; > $v[0][1][2][3][4][5][6][7][8][9]; > > How/why are we going from 1 Notice to 10?! > > With: > > unset($v); > $v[0]; > > Why from 1 Notice about the undefined variable, to 2? That's totally > new, and it really doesn't make sense to make any more noise after > you've already been told about the variable. (Same after the first > undefined array offset, too, but this makes the point more obvious.) > > That's why I'm saying, you can only really change it for non-NULL > scalars that have an actual value, to keep this other stuff the same, > and sane. > > I don't really see a semantic issue with the NULL case, either, unlike > other scalar types. Current behavior: foo->bar; ?> Notice: Trying to get property of non-object in %s on line %d Notice: Trying to get property of non-object in %s on line %d So trying to access a property on NULL gives a notice, but trying to access an element of NULL shouldn't? Also note, that chained property access raises multiple notices. -- Christoph M. Becker