Hi, just chiming in on a specific question/answer: On Tue, Apr 14, 2020 at 3:46 PM Gabriel Caruso <carusogabrie...@gmail.com> wrote: > > On Tue, 14 Apr 2020 at 15:24, Nicolas Grekas <nicolas.grekas+...@gmail.com> > wrote: > > > > > > Foo::__isset(string $name): bool; > > > Foo::__unset(string $name): void; > > > > Same comment about LSP, but also about the type: isn't it allowed to have > > integers as keys? How does this play with strict_type and array access? > > > Thanks for raise this. Nowadays, you can't: https://3v4l.org/pPJDt. But, if > you call as a method, yes: https://3v4l.org/0VmYQ.
Actually there are ways to use integers as property names, but they are converted to strings on creation: https://3v4l.org/0k4LS and https://3v4l.org/HhPZP (also https://3v4l.org/Ts42B). ArrayAccess doesn't use magic __isset(string $name) but interface offsetExists(mixed $offset). Regards, -- Guilliam Xavier -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php