note 55806 added to language.oop5.magic

From: Date: Sun, 14 Aug 2005 01:26:21 +0000
Subject: note 55806 added to language.oop5.magic
Groups: php.notes 
Request: Send a blank email to php-notes+get-93571@lists.php.net to get a copy of this message
Intriguing what happens when __sleep() and __wakeup() and sessions() are mixed. I had a hunch that, as session data is serialized, __sleep would be called when an object, or whatever, is stored in _SESSION. true. The same hunch applied when session_start() was called. Would __wakeup() be called? True. Very helpful, specifically as I'm building massive objects (well, lots of simple objects stored in sessions), and need lots of automated tasks (potentially) reloaded at "wakeup" time. (for instance, restarting a database session/connection). ---- Manual Page -- http://www.php.net/manual/en/language.oop5.magic.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55806 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55806&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55806&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55806&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55806&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55806&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55806&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55806&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93571) next »