Re: ReflectionClass::newInstanceWithoutConstructor()

From: Date: Thu, 25 Aug 2011 12:54:38 +0000
Subject: Re: ReflectionClass::newInstanceWithoutConstructor()
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-54940@lists.php.net to get a copy of this message
On Thu, Aug 25, 2011 at 14:54, Etienne Kneuss <colder@php.net> wrote: > Hi, > > On Thu, Aug 25, 2011 at 14:49, Sebastian Bergmann <sebastian@php.net> wrote: >> On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote: >>> >>> Speaking of which, wouldn't it be easier to check all our internal >>> classes for such failures and fix them accordingly with this addition >>> (Fix the dont-crash-without-calling-constructor)? >>> >>> We could do like that of above and cast an exception instead of >>> E_RECOVERABLE_ERROR (as I believe is being cast now) in 5.4. >> >>  Makes sense to me. > > There is already some standardized checks for 5.4 that wrap around the > get_constructor handler. In SPL, that is > But it should/could be standardized at the > engine level. And those raise exceptions in case they detect a > uncalled constructor. > >> >> -- >> 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 > -- Etienne Kneuss http://www.colder.ch

« previous php.internals (#54940) next »