| | |
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
Views: 614 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download duplicates dynamic echo email error execution file files folder form forms function functions google href htaccess html htmlspecialchars image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php phpvotingscript problem query radio random recursion regex remote script search select server session sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





