Parents Clone

<?
    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->Name = "Poppy";    $rover = clone $poppy;
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.