bug73338.phpt 568 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #73338: Ensure exceptions in function init opcodes are cleaned properly
  3. --FILE--
  4. <?php
  5. try { call_user_func(new class { function __destruct () { throw new Error; } }); } catch (Error $e) {}
  6. set_error_handler(function() { throw new Error; });
  7. try { var_dump(new stdClass, call_user_func("fail")); } catch (Error $e) {}
  8. try { (function() { call_user_func("fail"); })(); } catch (Error $e) {}
  9. try { [new class { static function foo() {} function __destruct () { throw new Error; } }, "foo"](); } catch (Error $e) {}
  10. ?>
  11. ===DONE===
  12. --EXPECT--
  13. ===DONE===