Extends In Action

 
    <?php
class Checkout {
    final function totalize() {
        // calculate bill
    }
}class IllegalCheckout extends Checkout {
    final function totalize() {
        // change bill calculation
    }
}$checkout = new Checkout();?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.