| | |
What’s the meaning of __sleep and __wakeup?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
__sleep() and __wakeup() run prior to serialize() and unserialize() respectively.
http://us.php.net/oop5.magic
__sleep() returns an array of all variables prior to serializing an object
__wakeup() also runs prior to unserializing an object to reestablish any database connections etc... for that object prior to unserialization
http://us.php.net/oop5.magic
__sleep() returns an array of all variables prior to serializing an object
__wakeup() also runs prior to unserializing an object to reestablish any database connections etc... for that object prior to unserialization
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Other Threads in the PHP Forum
- Previous Thread: PHP to Excel
- Next Thread: updating the same row in php
| Thread Tools | Search this Thread |
advanced apache api array basics beginner binary broken cakephp check checkbox class cms code codingproblem combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert ip javascript job joomla js limit link login mail menu mlm mobile multiple mysql nodes oop outofmemmory paging parse password paypal pdf php problem procedure query radio random recursion remote script search server sessions smarty sms source space sql stored syntax system table traffic tutorial unicode up-to-date update upload url validation validator variable video web webapplications youtube





