Hi,

On Sat, Jun 22, 2019 at 3:59 PM Nikita Popov <nikita....@gmail.com> wrote:
>
> On Sat, Jun 22, 2019 at 2:24 PM Andrey Andreev <n...@devilix.net> wrote:
>>
>> Hi,
>>
>> With regards to the array_key_exists() deprecation, the RFC currently
>> says nothing about things like ArrayAccess and object properties that
>> contain arrays. I'm sure that these are exceptions that aren't meant
>> to be deprecated, but can you please specify that explicitly? We all
>> know how little bits like that can result in awful outcomes.
>
>
> Thanks for bringing this up: It's a great example of why this needs to be 
> deprecated. array_key_exists() actually has no support for ArrayAccess 
> objects at all -- it only operates on (mangled) object properties. But just 
> seeing the name and the fact that it doesn't error when passed an ArrayAccess 
> object, it's quite easy to jump to the wrong conclusion. I've updated the RFC 
> to mention this now.
>

Well, then I guess actually implementing ArrayAccess support should be
brought up now, but other than that the updated RFC content makes much
more sense now. Thank you.

> I don't understand what you mean by "object properties that contain arrays" 
> though, or rather how that related to array_key_exists().
>

I had a minor brain fart while originally thinking about this and it's
actually nothing. Sorry about that.

Cheers,
Andrey.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to