Is it possible for a class to extend the state of its parent class?
In the example provided, I was hoping for the statement to say ->
"I wish 10 equals to 10"
If there is a solution, I would like it to work with php 4+
Thanks

-----

class foo
{
    var $foo = 0;
}

$foo = new foo;
$foo->foo = 10;

class bar extends foo
{
    function bar()
    {
         echo "I wish $this->foo equals to 10";
    }
}

$bar = new bar;

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



Reply via email to