question, need help
class P{ //parent class
public static function get_class_name(){
return get_class(new self);
}
}
echo C::get_class_name(); //P
class C extends P{ //child
}
echo C::get_class_name(); //here call the static function, but the result is
P, C is the very result I want.
Can you give me some help or advice?
--
Anyone can't foretell tomorrow.
|