--TEST-- Calling reject() and then catch() with matching type should not report unhandled rejection --INI-- # suppress legacy PHPUnit 7 warning for Xdebug 3 xdebug.default_enable= --FILE-- catch(function (RuntimeException $e): void { echo 'Handled ' . get_class($e) . ': ' . $e->getMessage() . PHP_EOL; }); ?> --EXPECT-- Handled RuntimeException: foo