|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-05 15:00 UTC] sniper@php.net
[2005-06-06 18:30 UTC] ladislav dot prosek at matfyz dot cz
[2005-06-06 23:59 UTC] sniper@php.net
[2005-06-07 09:04 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
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 } }