abstract class grandParent{
protected $myid;
public function __construct($someid=-1){
$this->myid=$someid;
if($someid>0)$this->init();
}
}
class Parent extends grandParent{
protected $commoninfo;
public function someCommonMethod()
{
echo $this->commoninfo;
echo $this->specialinfo;
}
}
class Child extends Parent{
protected $specialinfo;
public function init()
{
$this->commoninfo='MyCommonInfo';
$this->specialinfo='MySpecialInfo';
}
}
$var=new Child($someid);
$var->someCommonMethod(();