Hi!

> As discussed in previous threads about this failure, we (doctrine) can
> move away from the `unserialize()` hack if
> `ReflectionClass#newInstanceWithoutConstructor()` provides support for
> internal classes.

Could you explain why it is needed to instantiate internal classes
without calling the ctor? I'd like to understand the use case more.

> It doesn't need to cover ALL internal classes, just the most commonly
> extended ones.

The problem is we do not know which of these classes may fail if
instantiated without initializing. With PHP classes, it's easy since the
engine takes care of the basic plumbing. With C classes, if you don't
call the function, you get nulls or worse, garbage, in places where
values are expected.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to