Tag Archives: Serializing

Serializing Objects

o Functions: serialize() / unserialize()

o Magic method __sleep() is executed with serialization, if available o allows you to specify which properties should be stored (serialized) and which should not be stored

o Can also create/change properties for serialization

o Magic method __wakeup() is executed with deserialization, if available ex: to open a database connection unique to the object