Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88343 invoked by uid 1010); 26 Aug 2004 22:17:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 72900 invoked from network); 26 Aug 2004 22:15:09 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 26 Aug 2004 22:15:09 -0000 Received: (qmail 5153 invoked from network); 26 Aug 2004 22:15:07 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 26 Aug 2004 22:15:07 -0000 Message-ID: <5.1.0.14.2.20040826151228.048a6a20@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 26 Aug 2004 15:15:16 -0700 To: "Rob Richards" , In-Reply-To: <074001c48bae$4ddd84f0$f7dea8c0@cyberware.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] ze1_compatibility_mode and cloning From: andi@zend.com (Andi Gutmans) References: <074001c48bae$4ddd84f0$f7dea8c0@cyberware.local> 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