ID:               49821
 Updated by:       col...@php.net
 Reported By:      liz2k dot b8 at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *Programming Data Structures
 Operating System: linux
 PHP Version:      5.2.11
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This is expected, unserialize() doesn't return a reference.


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

[2009-10-12 11:46:32] liz2k dot b8 at gmail dot com

I said about references in unserialize object - R and r.

If last reference of serialized object is R - then all references of
unserialized object will R. (linked by pointer (c++))

If last reference of serialized object is r - then all references of
unserialized object will r. (just refer to one object $a)

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

[2009-10-12 11:21:28] sjo...@php.net

I don't understand your answer. Please explain, preferably with a code
example, how the behavior you described causes a problem.

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

[2009-10-12 07:01:18] liz2k dot b8 at gmail dot com

no - you can try serialize(&unserialize(serialize($a))).

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

[2009-10-11 09:33:52] sjo...@php.net

Thank you for your bug report.

Is there a problem with this other than that the serialization string
is different? Do objects $a and $b have different behavior?

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

[2009-10-09 14:05:22] liz2k dot b8 at gmail dot com

And one more wrong work Example:

        $a = new stdClass;
        $a->v2 = &$a;
        $a->v1 = $a;
        
        echo serialize($a)."\n";
        
        $b = &unserialize(serialize($a));
        
        echo serialize($b);

Expected result:
----------------
O:8:"stdClass":2:{s:2:"v2";R:1;s:2:"v1";r:1;}
O:8:"stdClass":2:{s:2:"v2";R:1;s:2:"v1";r:1;}

Actual result:
--------------
O:8:"stdClass":2:{s:2:"v2";R:1;s:2:"v1";r:1;}
O:8:"stdClass":2:{s:2:"v2";r:1;s:2:"v1";r:1;}

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

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/49821

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

Reply via email to