In previous versions, serializing an object will lose the functions attached, but in php5 it’s no longer a problem.

Some test code here:

$obj = new Model_Film_Movie();
$obj->setID(12);
$obj->setMovie('a test movie');

$objflattened = serialize($obj);
echo '<pre>';

$objnew = unserialize($objflattened);
//var_dump($objflattened, $objnew);

echo $objnew->getMovie();
exit;

I am sure this will make the ORM pattern much more useful in php apps and websites :)