How come the output to this script is "World Trade Center" instead of "Pizza
Delivery"?

Thanks,

Ed

----------------------------------------------------------------

<?php

class test {
        private $var1;
        
        function __construct() {
                $this->var1 = "World Trade Center";
        }
        
        function get_var1() {
                return $this->var1;
        }
        
        function set_var1($data) {
                $this->var1 = $data;
        }
}

class testing extends test {
        function __construct() {
                parent::__construct();
                $this->var1 = "Pizza Delivery";
        }
}


$test2 = new testing();
print "var1 = " . $test2->get_var1() . "<br>";

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to