Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class X {
- private $message = 'Main class';
- public function __destruct()
- {
- echo 'Object ob class "'. __METHOD__ .'" is destroyed!<br>';
- echo $this->message . '<br>';
- }
- }
- class Y extends X {
- public function __destruct(){
- echo __METHOD__ . '<br><br>';
- }
- }
- $x = new X;
- $y = new Y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement