Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // The blueprint
- class iPhone
- {
- public function orderPizza($typeOfPizza)
- {
- echo "Your " . $typeOfPizza . " pizza has been ordered";
- }
- }
- // create a copy of the class (blueprint)
- $iPhone = new iPhone;
- // use the orderPizza method
- $iPhone->orderPizza('pepperoni and mushroom');
- // Result: Your pepperoni and mushroom pizza has been ordered
Add Comment
Please, Sign In to add comment