PHP COURSE • LESSON 41
PHP Interfaces
Interfaces define methods that classes must implement.
interface.php
<?php
interface Animal{
public function sound();
}
class Cat implements Animal{
public function sound(){
echo "Meow";
}
}
?>