Re: Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

From: Date: Wed, 31 Aug 2016 07:58:16 +0000
Subject: Re: Re: [RFC][VOTE] E_WARNING on invalid container read-adccess
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-95513@lists.php.net to get a copy of this message
Dmitry Stogov <dmitry@zend.com> schrieb am Mi., 31. Aug. 2016, 08:37: > I vote NO, because the implementation introduces more problems than > intents to fix. > > For example the following code starts to throw exception: > > > <?php $a = [null]; $c = null; var_dump($a[0][0] + $c[0]); ?> > Array access on null should always throw IMO. BTW, I'm not against the feature, I'm against the implementation. > > It's just can't be committed in current state. I think we vote on features, not implementations. Therefore you should probably have voted yes. Thanks. Dmitry. > > > ________________________________ > From: Christoph M. Becker <cmbecker69@gmx.de> > Sent: Thursday, August 25, 2016 2:49:51 PM > To: David Walker; PHP internals > Subject: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container > read-adccess > > On 16.08.2016 at 17:55, David Walker wrote: > > > I raised this concept a couple weeks ago to a couple +1's. Discussion > was > > held mostly upon the PR [1], and I went through and documented within the > > RFC [2]. I'd like to go ahead and open up the RFC to voting to the scope > > that it is written. > > > > [1] https://github.com/php/php-src/pull/2031 > > [2] –‘Ͻ s > > ðÔ>´`œ}https://wiki.php.net/rfc/notice-for-non-valid-array-container > > For the record, the RFC rightly claims: > > | The default behavior, of a silent NULL return, is not correctly > | defined in the Array Documentation however is noted in a comment > > I have documented this behavior now[3], and removed the note, which was > not quite correct, because it claimed that TRUE would be returned when > array dereferencing NULL, bool or int. > > [3] > <http://svn.php.net/viewvc?view=revision&revision=339937> > > -- > Christoph M. Becker > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#95513) next »