PHP中类的延迟绑定
<?php header("content-type:text/html;charset=utf-8"); class a{ public function call(){ echo "父类的".__CLASS__; } public static function say(){ self::call();//直接在父类中调用call方法 } public static function say1(){ static:: call();//延迟绑定到b的call方法 } } class b extends a{ public function call(){ echo "子类的".__CLASS__; } } b::say();//父类的a b::say1();//子类的b