Annotation of embedaddon/php/Zend/tests/bug60909_2.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
                      3: --FILE--
                      4: <?php
                      5: register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
                      6: set_error_handler(function($errno, $errstr, $errfile, $errline){throw new Exception("Foo");});
                      7: 
                      8: class Bad {
                      9:     public function __toString() {
                     10:         throw new Exception('Oops, I cannot do this');
                     11:     }
                     12: }
                     13: 
                     14: $bad = new Bad();
                     15: echo "$bad";
                     16: --EXPECTF--
                     17: Fatal error: Method Bad::__toString() must not throw an exception in %sbug60909_2.php on line 0
                     18: 
                     19: 
                     20: !!!shutdown!!!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>