Hi,
On Thu, Aug 25, 2011 at 11:46, Sebastian Bergmann <[email protected]> wrote:
> I have attached a patch to https://bugs.php.net/bug.php?id=55490 that
> implements ReflectionClass::newInstanceWithoutConstructor() to create an
> object a class without invoking the constructor.
To me this feature makes no sense. But if people find use for it and
it remains in Reflection, I won't object to it, so +0.
>
> As there are certain internal classes that would "crash" when their
> constructor is not invoked, this new method of the Reflection API only
> works for userland-defined classes.
I don't believe there should be this artificial distinction. Internal
classes should behave like userland ones in every aspect, let's not
put additional barriers.
If an internal class can't behave well without a constructor call,
that should already be fixed/prevented, as it's already possible by
extending it.
>
> Unless there are objections, I will commit this change to PHP_5_4 and
> trunk on Monday. I will add the method to the documentation as well, of
> course.
>
> --
> Sebastian Bergmann Co-Founder and Principal Consultant
> http://sebastian-bergmann.de/
> http://thePHP.cc/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Etienne Kneuss
http://www.colder.ch