Saving Objects : serialize « Utility Function « PHP






Saving Objects

 
<?
    abstract class Dog {
            public function __clone( ) {
                    echo "In dog clone\n";
            }
    }

    class Poodle extends Dog {
            public $Name;
                    public function __clone( ) {
                    echo "In poodle clone\n";
                    parent::__clone( );
            }
    }

    $poppy = new Poodle('Poppy');
    $safepoppy = urlencode(serialize($poppy));
?>
  
  








Related examples in the same category

1.Saving Arrays
2.Storing and Retrieving Objects
3.Serialization