Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. class X {
  2.     private $message = 'Main class';
  3.     public function __destruct()
  4.     {
  5.         echo 'Object ob class "'. __METHOD__ .'" is destroyed!<br>';
  6.         echo $this->message . '<br>';
  7.     }
  8. }
  9. class Y extends X {
  10.     public function __destruct(){
  11.         echo __METHOD__ . '<br><br>';
  12.     }
  13. }
  14.  
  15. $x = new X;
  16. $y = new Y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement