Re: [PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-26 Thread AllenJB
I've added an explicit set of tests for object properties and function return values and they're passing for me (I also updated the branch to current master and updated the tests to handle Engine Exceptions). The build passes on my branch, but 1 failed on the PR and I can see no way to request

Re: [PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-25 Thread Sherif Ramadan
Hmmm... I'm not really sure whether to consider this a language change or not. I mean no syntax has changed, but sure it does break BC because of the new notice. I'm really dubious about whether or not this demands an RFC. I've seen more sweeping changes make it into a release with less discussion

Re: [PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-25 Thread AllenJB
I have a pull request pending on this bug: https://github.com/php/php-src/pull/1269 It's been discussed before ("Array dereferencing of scalars", 10th June 2015 - I'm pretty sure it was discussed at least once more since then too) and I was basically told it would require an RFC to get it acce

Re: [PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-25 Thread Christoph Becker
On 25.08.2015 at 15:48, Sherif Ramadan wrote: > You're right. The notice is triggered by array_push behavior only, which > means that $x = true; echo $x['foo']; doesn't trigger the notice, which is > the same as your code above. Only write operations have historically > resulted in this notice. >

Re: [PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-25 Thread Sherif Ramadan
Hey Nicolai, You're right. The notice is triggered by array_push behavior only, which means that $x = true; echo $x['foo']; doesn't trigger the notice, which is the same as your code above. Only write operations have historically resulted in this notice. I would agree that providing the notice wo

[PHP-DEV] Notice on non existing array key (on a boolean)

2015-08-25 Thread Nicolai Scheer
Hi all, I'd expect the following code to throw a notice/warning: $x = true; $y = $x['foo']; It executes completely silently. $y is NULL afterwards, which is expected, since the right hand side of the assignment is undefined. If $x was an array (e.g. empty array), a E_NOTICE would be emitted. C