Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Vehicle {
- public function honk() {
- return "HONK HONK!";
- }
- }
- class Bicycle extends Vehicle {
- public function honk() {
- return "Beep beep!";
- }
- }
- $bicycle = new Bicycle();
- echo $bicycle->honk();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement