SHARE
TWEET

Untitled

a guest Jul 23rd, 2016 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. class Tree
  3. {
  4.     public function __construct()
  5.     {
  6.         var_dump('good');
  7.     }
  8.    
  9.     public function __destruct()
  10.     {
  11.         var_dump('bad');
  12.     }
  13. }
  14.  
  15. class Candy
  16. {
  17.     public function ThrowError()
  18.     {
  19.         TRIGGER_ERROR('Go', E_USER_ERROR);
  20.     }
  21.    
  22.     public function HandleError()
  23.     {
  24.         exit;
  25.     }
  26.    
  27.     public function Go()
  28.     {
  29.         set_error_handler([$this, 'HandleError']);
  30.         return new Tree($this->ThrowError());
  31.     }
  32. }
  33.  
  34. $C = new Candy();
  35. $C->Go();
  36.  
  37. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top