final class : final « Class « PHP






final class


<?php
final class Checkout {
    // ...
}

class IllegalCheckout extends Checkout {
    // ...
}

$checkout = new Checkout();

?>

           
       








Related examples in the same category

1.Declaring Final Classes and Methods
2.Final Methods
3.final keyword can be used to declare a class uninheritable
4.The final keyword is used to declare that a method or class cannot be overridden by a subclass