*************************
class A {
public $attribute1;
public function operation1() {
echo "operation1:".$this->attribute1."
";
}
}
class B extends A {
public $attribute2;
public function operation2() {
echo "Operation2
";
$this->attribute1=$this->attribute2;
}
}
$b = new B();
$b->attribute1=27;
$b->operation1();
$b->attribute2 = 10;
$b->operation2();
$b->operation1();
*************************
operation1:27