Jochem Maas wrote:
this is wrong - the ctor is not called at all when unserializing, check this
code snippet:
php -r '
class Test { function __construct() { echo "foo\n"; } }
$t = new Test;
$s = serialize($t);
unset($t);
$u = unserialize($s);
'
this only outputs 'foo' once.
seems like whatever Dave's problem was it's actually down to
missing ctor args.
Indeed, my bad. When I think about it it actually doesn't make sense for
it to be called. Seems to me like the OP needs to be using the __wakeup
magic method to re-initialise his objects.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php