1--TEST-- 2Test exceptions in eval during exception 3--PHPDBG-- 4r 5ev next_error() 6c 7 8q 9--EXPECTF-- 10[Successful compilation of %s] 11prompt> handle first 12[Uncaught Error in %s on line 16: Call to undefined function foo()] 13>00016: foo(); // Error 14 00017: } catch (\Exception $e) { 15 00018: var_dump($e); 16prompt> 17Fatal error: Uncaught Error: Call to undefined function next_error() in eval()'d code:1 18Stack trace: 19#0 %s(16): unknown() 20#1 %s(20): {closure:%s:%d}() 21#2 {main} 22 thrown in eval()'d code on line 1 23prompt> [Uncaught Error in %s on line 16] 24Error: Call to undefined function foo() in %s:16 25Stack trace: 26#0 %s(20): {closure:%s:%d}() 27#1 {main} 28[Script ended normally] 29prompt> [The stack contains nothing !] 30prompt> 31--FILE-- 32<?php 33 34(function() { 35 try { 36 foo(); // Error 37 } catch (\Exception $e) { 38 var_dump($e); 39 } finally { 40 print "handle first\n"; 41 return "ok"; 42 } 43})(); 44 45(function() { 46 try { 47 foo(); // Error 48 } catch (\Exception $e) { 49 var_dump($e); 50 } 51})(); 52