2 Test catching fatal errors when handlers are nested
6 namespace Symfony\Component\Debug;
9 while (!file_exists($vendor.'/vendor')) {
10 $vendor = dirname($vendor);
12 require $vendor.'/vendor/autoload.php';
15 ini_set('display_errors', 0);
17 $eHandler = set_error_handler('var_dump');
18 $xHandler = set_exception_handler('var_dump');
21 $eHandler[0] === $xHandler[0] ? 'Error and exception handlers do match' : 'Error and exception handlers are different',
24 $eHandler[0]->setExceptionHandler('print_r');
27 class Broken implements \Serializable
36 string(37) "Error and exception handlers do match"
38 object(Symfony\Component\Debug\Exception\FatalErrorException)#%d (%d) {
39 ["message":protected]=>
40 string(199) "Error: Class Symfony\Component\Debug\Broken contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Serializable::serialize, Serializable::unserialize)"