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. I don't understand what you mean by "object properties that contain arrays" though, or rather how that related to array_key_exists(). Also, it's unclear to me why get_called_class() should be deprecated. > While the rest of the listed deprecations have either motivation > written for them or are self-evidently legacy functionalities that > nobody should be using today, this one seems to be just a case of > "let's not have more than one way of doing things" and I'm not really > a fan of that. > Personally I agree. I don't really see a strong motivation for dropping this function. Kalle? Nikita