Sleeping and waking up in PHP

Nov 30, 2010 Author: Dusan
PHP provides a hook mechanism so that objects can specify what should happen just before serialization and just after unserialization. The special member function __sleep() (that’s two underscores before…