Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. abstract class AbstractClass {
  2. protected abstract function foo($data);
  3.  
  4. public function __construct($param) {
  5. self::foo($param);
  6. }
  7. }
  8.  
  9. class ConcreteClass extends AbstractClass {
  10. public $propertie;
  11.  
  12. protected function foo($data) {
  13. $this->propertie = $data;
  14. }
  15. }
  16.  
  17. $fa = new ConcreteClass('banana');
  18. echo $fa->propertie;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement