3 // Tests a case where prepareFuncEntry throws in a nested VM context.
5 function error_handler() {
6 echo "Error handler\n";
7 throw new Exception("unhandled exception");
9 set_error_handler('error_handler');
11 function binary_function(string $x, $y) {
15 // Throw from the user error handler after raising a warning about
17 call_user_func_array('binary_function', array(12, 12));
18 } catch (Exception
$x) {
19 echo "We hit our handler.\n";
20 throw new Exception("Sup");
23 // Try it with no catch also.
24 call_user_func_array('binary_function', array(12, 12));