mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7aacc705d0
Closes GH-5958
25 lines
488 B
PHP
25 lines
488 B
PHP
--TEST--
|
|
Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
|
|
--FILE--
|
|
<?php
|
|
register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
|
|
|
|
class Bad {
|
|
public function __toString() {
|
|
throw new Exception('I CAN DO THIS');
|
|
}
|
|
}
|
|
|
|
$bad = new Bad();
|
|
echo "$bad";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: I CAN DO THIS in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): Bad->__toString()
|
|
#1 {main}
|
|
thrown in %s on line %d
|
|
|
|
|
|
!!!shutdown!!!
|