Bug #14266 Updated: serialize() doesn't work correcty
| From: | jmoore@php.net | Date: | Wed, 28 Nov 2001 13:38:02 +0000 |
| Subject: | Bug #14266 Updated: serialize() doesn't work correcty | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-71914@lists.php.net to get a copy of this message | ||
ID: 14266
Updated by: jmoore
Reported By: lenar@vision.ee
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Debian Linux
PHP Version: 4.1.0
New Comment:
Circualar reference here:
$x->x =& $x;
These dont work as expected at all.
Bogus bug report as the lang isnt designed to support this.
- James
Previous Comments:
------------------------------------------------------------------------
[2001-11-28 08:32:48] lenar@vision.ee
Consider following simple script. It's pretty obvious
that serialize() does not work correctly (at least not as
expected).
<?php
$x = new stdClass();
$x->x =& $x;
$s = serialize($x) . "\n";
echo "test on original: "; // OK
$x->a = "str";
echo $x->x->a . "\n";
$o = unserialize($s);
echo "test on unserialized object: "; // not OK
$o->a = "str";
echo $o->x->a . "\n";
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14266&edit=1