Implement An Interface

 
    <?php
interface Chargeable {
    public function getPrice();
}class Employee implements Chargeable {
    protected $price;    public function getPrice() {
        return $this->price;
    }
}$product = new Employee();?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.