Re: [RFC] Deprecations for 7.4
| From: | Andrey Andreev | Date: | Sat, 22 Jun 2019 21:33:27 +0000 |
| Subject: | Re: [RFC] Deprecations for 7.4 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106040@lists.php.net to get a copy of this message | ||
Hi,
On Sat, Jun 22, 2019 at 3:59 PM Nikita Popov <nikita.ppv@gmail.com> wrote:
>
> On Sat, Jun 22, 2019 at 2:24 PM Andrey Andreev <narf@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.