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.


Andi

At 04:50 PM 8/26/2004 -0400, Rob Richards wrote:
ze1_compatibility_mode when set on calls clone on objects implicitly and is
causing some issues with extensions such as dom and xsl to name a few. Is it
possible to add something like the contained patch, which would allow an
object to implement an additional clone handler used only when the clone
call is from the engine's ze1_compatibility_mode calls?

i.e. the objects ze1 clone handler would be something like:
zend_object_value dom_objects_ze1_clone_obj(zval *zobject TSRMLS_DC)
{
 zend_objects_store_add_ref(zobject TSRMLS_CC);

 return zobject->value.obj;
}

so that a reference is returned rather than really cloning the internal
object as a real clone is not desireable here unless the developer
explicitly calls clone $obj.

Rob

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

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



Reply via email to