The issue is that with some of the new extensions, the object "breaks" when compatibility mode is enabled making the extensions useless. The patch was basically an attempt to allow a way for the extensions to be able to run under compatibility mode. Take for example a simple case (NULL is returned with var_dump under compat mode): <?php $dom = new DomDocument(); $dom->loadXML("<root> hello </root>"); $element = $dom->documentElement; var_dump($element->parentNode); ?>
This is due to the clone functionality, which is correct when someone does "clone $obj". Either there should be a way to allow extensions to be written to support compat mode and clone (providing different functionality), compat mode should be able to be disabled in an extension while clone syntax supported, or a decision should be made that in cases where the two cant have the same functionality that clone just shouldnt be supported. Im not sure about other new extensions running into this, but simplexml is another I played around with that runs into the same thing. Rob From: Andi Gutmans > What is the issue? In general, as it's compatibility mode it's not supposed > to solve 100% but only 99.5% of the problems, and I don't really want to > change the engine's general API unless it's for a good reason. > Actually I have not seen many applications that have been broken due to the > removal of auto-cloning in PHP 5. > I think that as porting is required to use the new DOM/XSL extensions > anyway, they should also port their OO code. The idea was that old > untouched code would run, but if you want to take advantage of new features > you're best to port all the way. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php