예제 #1
0
}


class Stu extends Human{

}

class FreshMan extends Stu{
	public function Say(){
		echo '我要出国,做美得坚人!<br/>';
	}
}

echo 'final修饰的方法可以继承<br />';

$ming = new Stu();
$ming->Say();
$ming->show();


echo '但不可以修改<br />';

$fr = new FreshMan();
$fr->Say();
$fr->show();
/*
Fatal error: Cannot override final method Human::Say()
*/
?>