943,829 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1142
  • PHP RSS
Aug 21st, 2008
0

What’s the meaning of __sleep and __wakeup?

Expand Post »
Please anybody tell me the meaning of __sleep and __wakeup.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shilpamg is offline Offline
12 posts
since Aug 2008
Aug 21st, 2008
0

Re: What’s the meaning of __sleep and __wakeup?

__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
Reputation Points: 358
Solved Threads: 89
Posting Shark
R0bb0b is offline Offline
986 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP to Excel
Next Thread in PHP Forum Timeline: updating the same row in php





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC