ID:               24485
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bugs dot php dot net at public dot salagir dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      4CVS-2005-08-23
 Assigned To:      derick
 New Comment:

Derick: fixed, not fixed..?


Previous Comments:
------------------------------------------------------------------------

[2006-05-20 11:01:27] antonio dot caprio at gmail dot com

To copy an array having object elements use
unserialize(serialize(myarray)):

<?php
class test {
        VAR $test_var = 'this is default value';
}
$a = array(new test());
$b = $a;
$b[0]->test_var = 'this is set by $b instance';
print_r($a);
print_r($b);
$c = unserialize(serialize($a));
$c[0]->test_var = 'this is set by $c instance';
echo "---------------------\n";
print_r($a);
print_r($b);
print_r($c);
?>
Be careful! If you have __sleep AND __wakeup functions in your class
you could have problem!

------------------------------------------------------------------------

[2006-05-10 15:45:33] php dot net at nanonanonano dot net

CVS snapshot of PHP4 branch as of 2006-05-10 still shows this bug.

And to reiterate a previously mentioned very polite note to the php
developers... please actually run the trivially simple test case given
in the bug report to see if it has been fixed. Also, please reference a
specific CVS commit (ok, harder to do with cvs than svn, but still
possible) that you think fixes this bug. That way, we have a fighting
chance of seeing where you are looking in the code and might be able to
help out; at present, we don't know where to start.

(this is at least the fourth iteration of "try CVS"/"still broken" on
this bug... it really is starting to make you look silly)

------------------------------------------------------------------------

[2005-03-24 21:48:33] [EMAIL PROTECTED]

For Derick, see also bug #32261 (same issue?)




------------------------------------------------------------------------

[2005-02-03 21:59:04] [EMAIL PROTECTED]

This should NOT be a problem in PHP - but it is one in PHP 4. I've seen
this too and have a patch almost ready that backports the fixes done in
PHP 5.

------------------------------------------------------------------------

[2005-01-21 00:19:11] [EMAIL PROTECTED]

Still exists in 4.3, but has been already fixed in both 5.x branches.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24485

-- 
Edit this bug report at http://bugs.php.net/?id=24485&edit=1

Reply via email to