Nasıl özel sınıf adı ile statik php değişken erişebilirsiniz. Sınıf c1 yöntemi hi () Ben onun alt sınıfının statik değişkeni erişmek gerekir. PHP < 5.3
class c1{
function hi(){
$cn=get_class($this);
echo $cn::$b; //need echo 5 here, but error
}
}
class c2 extends c1{
static public $b=5;
}
$c2=new c2();
$c2->hi();