Serialization

You can also serialiseopen in new window and unserialiseopen in new window your DTOs, using PHP's native methods.

Serialise

$serialised = serialize($person);

Unserialise

$person = unserialize($serialised);