PHP has a couple functions called __sleep() and __wakeup(). These only work from inside of a class though. Here is a link to the php documentation where you can learn about these two functions:
__________________ Cod3X - Eric Barr
<span style=\'color:red\'>Project Manager :: E n v o l u t i o n</span>
Must read Review for Serious PHP Developers
NuSphere PhpED 5.5
: The Staff of php-editors.com recently spent a few days working with NuSphere
PhpED 5.5
(a popular PHP IDE) and
NuCoder 2.0
(a PHP Encoding Utility), read up on all the details.