note 79891 deleted from language.oop.serialization by danbrown

From: Date: Sat, 07 Nov 2009 19:12:47 +0000
Subject: note 79891 deleted from language.oop.serialization by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162597@lists.php.net to get a copy of this message
Note Submitter: Sam ---- It's worth noting that when you serialize an object (after creating it normally), its __sleep method will be called, and then when the object naturally goes out of scope, it's __destruct method will also be called. However, when you unserialize an object, its __wakeup method will be called, but it's __construct method will not be called. I'm not quite sure if there's a way to force an object completely out of scope without having __destruct automatically be called. If there is though (and it's neat - not like invoking 'die' at the end of every page), I'd like to hear about it!

« previous php.notes (#162597) next »