--TEST-- The callback given to the last set_rejection_handler() should be invoked for unhandled rejection --INI-- # suppress legacy PHPUnit 7 warning for Xdebug 3 xdebug.default_enable= --FILE-- getMessage() . PHP_EOL; }); // previous rejection handler should be first rejection handler callback var_dump($ret === $first); reject(new RuntimeException('foo')); echo 'done' . PHP_EOL; ?> --EXPECT-- bool(true) bool(true) Unhandled RuntimeException: foo done