#33243 [Fbk->Opn]: ze1_compatibility_mode does not work as expected

From: Date: Mon, 06 Jun 2005 16:30:45 +0000
Subject: #33243 [Fbk->Opn]: ze1_compatibility_mode does not work as expected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79965@lists.php.net to get a copy of this message
ID: 33243 User updated by: ladislav dot prosek at matfyz dot cz Reported By: ladislav dot prosek at matfyz dot cz -Status: Feedback +Status: Open Bug Type: Zend Engine 2 problem Operating System: Windows XP SP2 PHP Version: 5.0.4 New Comment: Still the same. Only the top-level object is cloned. Previous Comments: ------------------------------------------------------------------------ [2005-06-05 15:00:28] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2005-06-04 20:12:43] ladislav dot prosek at matfyz dot cz Description: ------------ When zend.ze1_compatibility_mode is On, object copying is not compliant to PHP4. Namely, objects are not deep-copied on assignment. This may cause substantial problems to legacy applications that rely on the compatibility mode. Reproduce code: --------------- $a->y->z = 0; $b = $a; // should perform deep copy of $a $b->y->z = 1; // hence this should have no effect on $a var_dump($a); Expected result: ---------------- object(stdClass)#1 (1) { ["y"]=> object(stdClass)#2 (1) { ["z"]=> int(0) // <-- } } Actual result: -------------- object(stdClass)#1 (1) { ["y"]=> object(stdClass)#2 (1) { ["z"]=> int(1) // because $a->y and $b->y are still one object after the assignment } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33243&edit=1

« previous php.bugs (#79965) next »