diff options
Diffstat (limited to 'tests/classes/destructor_and_exceptions.phpt')
-rw-r--r-- | tests/classes/destructor_and_exceptions.phpt | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/classes/destructor_and_exceptions.phpt b/tests/classes/destructor_and_exceptions.phpt index f58bb8de7f..0f51a21a09 100644 --- a/tests/classes/destructor_and_exceptions.phpt +++ b/tests/classes/destructor_and_exceptions.phpt @@ -5,48 +5,48 @@ ZE2 catch exception thrown in destructor class FailClass { - public $fatal; + public $fatal; - function __destruct() - { - echo __METHOD__ . "\n"; - throw new exception("FailClass"); - echo "Done: " . __METHOD__ . "\n"; - } + function __destruct() + { + echo __METHOD__ . "\n"; + throw new exception("FailClass"); + echo "Done: " . __METHOD__ . "\n"; + } } try { - $a = new FailClass; - unset($a); + $a = new FailClass; + unset($a); } catch(Exception $e) { - echo "Caught: " . $e->getMessage() . "\n"; + echo "Caught: " . $e->getMessage() . "\n"; } class FatalException extends Exception { - function __construct($what) - { - echo __METHOD__ . "\n"; - $o = new FailClass; - unset($o); - echo "Done: " . __METHOD__ . "\n"; - } + function __construct($what) + { + echo __METHOD__ . "\n"; + $o = new FailClass; + unset($o); + echo "Done: " . __METHOD__ . "\n"; + } } try { - throw new FatalException("Damn"); + throw new FatalException("Damn"); } catch(Exception $e) { - echo "Caught Exception: " . $e->getMessage() . "\n"; + echo "Caught Exception: " . $e->getMessage() . "\n"; } catch(FatalException $e) { - echo "Caught FatalException: " . $e->getMessage() . "\n"; + echo "Caught FatalException: " . $e->getMessage() . "\n"; } ?> |