In cases in which you wish to prevent a subclass from overriding a superclass method, you can use the final keyword. Following Example shows how.
<?php <?php $object = new Subscriber; $object->display1(); // calling override method class User { final function display1() // with final keyword { echo "not allowed"; } } class Subscriber extends User // extending class { function display1() // overriding function save_user { echo "this is not allowed"; } } ?>