#34767 [Opn->Asn]: Zend Engine 1 Compatibility not copying objects correctly
| From: | sniper@php.net | Date: | Thu, 06 Oct 2005 18:55:39 +0000 |
| Subject: | #34767 [Opn->Asn]: Zend Engine 1 Compatibility not copying objects correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86147@lists.php.net to get a copy of this message | ||
ID: 34767
Updated by: sniper@php.net
Reported By: dstarr at allofe dot net
-Status: Open
+Status: Assigned
Bug Type: Scripting Engine problem
-Operating System: Suse 9
+Operating System: *
-PHP Version: 5.0.5
+PHP Version: 5CVS-2005-10-06 (cvs)
-Assigned To:
+Assigned To: dmitry
New Comment:
Dmitry, this thing doesn't really seem to work.
Somehow I'm getting the impression that it would be much better to just
nuke this option and make people fix their scripts..
Previous Comments:
------------------------------------------------------------------------
[2005-10-06 20:49:00] dstarr at allofe dot net
Description:
------------
When zend.ze1_compatibility_mode is On, copying objects that have
references to other objects the object that was referenced is copied
instead of the reference itself.
The Expected Results were obtained by using PHP 4.4.0
The Actual is a result of running on 5.0.5
Reproduce code:
---------------
$a->y = &new stdClass();
print_r($a);
echo "<br/>";
$b = $a;
$a->y->z = 1;
print_r($b);
Expected result:
----------------
// Expected Output
// stdClass Object ( [y] => stdClass Object ( ) )
// stdClass Object ( [y] => stdClass Object ( [z] => 1 ) )
Actual result:
--------------
// Actual Output
// stdClass Object ( [y] => stdClass Object ( ) )
// stdClass Object ( [y] => stdClass Object ( ) )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34767&edit=1