Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- abstract class Person {
- abstract public function getName();
- public function getIntroduction() {
- return sprintf(
- __('My name is %s'),
- $this->getName()
- );
- }
- }
- // Person cannot be instantiated
- class Manuel extends Person {
- public function getName() {
- return 'Manuel';
- }
- }
- // Manuel can be instantiated
- $manuel = new Manuel();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement