Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Tree
- {
- public function __construct()
- {
- var_dump('good');
- }
- public function __destruct()
- {
- var_dump('bad');
- }
- }
- class Candy
- {
- public function ThrowError()
- {
- TRIGGER_ERROR('Go', E_USER_ERROR);
- }
- public function HandleError()
- {
- exit;
- }
- public function Go()
- {
- set_error_handler([$this, 'HandleError']);
- return new Tree($this->ThrowError());
- }
- }
- $C = new Candy();
- $C->Go();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement