Guest User

Untitled

a guest
Mar 13th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. class B {
  4. function __construct($x = 1)
  5. {
  6. $this->e = $x;
  7. }
  8. }
  9.  
  10. class A extends B {
  11. protected $e;
  12.  
  13. function __construct($x = 2)
  14. {
  15. $this->у = $x;
  16.  
  17. parent::__construct($x);
  18. }
  19. }
  20.  
  21.  
  22. $f = new A;
  23.  
  24. echo $f->e
Add Comment
Please, Sign In to add comment