Please anybody tell me 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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.