Bug #12961: classes, arrays and serialize / sessions
| From: | mattar at jep dot de | Date: | Sat, 25 Aug 2001 23:17:00 +0000 |
| Subject: | Bug #12961: classes, arrays and serialize / sessions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-64326@lists.php.net to get a copy of this message | ||
From: mattar@jep.de
Operating system: Suse 6.3
PHP version: 4.0.4pl1
PHP Bug Type: Class/Object related
Bug description: classes, arrays and serialize / sessions
<?
class test {
var $num;
function test($p) {
$this->num=$p;
}
function nothing() {}
}
$temp[0]=new test("foo");
echo htmlentities(serialize($temp));
$temp[0]->nothing();
echo "<p>".htmlentities(serialize($temp));
?>
----
The above script gives me the following output:
----
a:1:{i:0;O:4:"test":1:{s:3:"num";s:3:"foo";}}
a:1:{}
----
This too breaks the session functions for that object.
--
Edit bug report at: http://bugs.php.net/?id=12961&edit=1