__sleep « Class « PHP






1.Controlling serialization using __sleep() and __wakeUp()
2.__sleep() method is called by serialize() before it packs up the object.