note 5711 deleted from function.serialize by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 18:08:42 +0000 |
| Subject: | note 5711 deleted from function.serialize by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134144@lists.php.net to get a copy of this message | ||
Note Submitter: nargy at yahoo dot com
----
About serialize/unserialize on objects:
Use this class to unserialize objects :
<?php
class Unserializable
{
function unserialize($str)
{
$ary=unserialize($str);
for(reset($ary);$kv=each($ary);)
{
$key=$kv[key];
if (gettype($this->$key)!="user function")
$this->$key=$kv[value];
}
}
}
?>