I was just wondering if I could extend a class that has already extended another class and it work as if it were just one class extending another?
What I mean is, would the following code work as expected?
<?php
class A
{
var $one = 1;
}
class B extends A
{
var $two = 2;
function method()
{
return $this->one;
}
}
class C extends B
{
var $three = NULL;
function dojob()
{
$this->three = $this->method() + $this->two;
return $this->three;
}
}
?>
I am running on PHP4.3 atm