On Wed, May 26, 2021 at 12:14 PM Joe Watkins <krak...@php.net> wrote:
> Hi internals, > > In response to: https://bugs.php.net/bug.php?id=78480 > > I implemented: https://github.com/php/php-src/pull/7029 > > Not absolutely convinced that it's a good idea, I asked Nikita to review, > and he's unconvinced also and suggested a discussion should be started. > > You can read both of our thoughts about it on the PR. > > What I'm looking for now, is reasons that we are wrong - good use cases > that aren't born from code that is doing bad things ... > > Equally if you think this is really bad even if the reason has already been > mentioned, please make noise. > What's the problem with good 'ol `(new ReflectionProperty(Foo::class, 'bar'))->isInitialized($baz)` ? If it's instantiation time/performance, I'm fairly sure that typical reflection instantiation caching works just fine (and a new API would need a lot of meaningful benchmarks to be warranted). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/