bug64966.phpt 688 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Bug #64966 (segfault in zend_do_fcall_common_helper_SPEC)
  3. --FILE--
  4. <?php
  5. error_reporting(E_ALL);
  6. set_error_handler(function($error) { throw new Exception(); }, E_RECOVERABLE_ERROR);
  7. function test($func) {
  8. $a = $func("");
  9. return true;
  10. }
  11. class A {
  12. public function b() {
  13. test("strlen");
  14. test("iterator_apply");
  15. }
  16. }
  17. $a = new A();
  18. $a->b();
  19. ?>
  20. --EXPECTF--
  21. Fatal error: Uncaught exception 'Exception' in %sbug64966.php:3
  22. Stack trace:
  23. #0 [internal function]: {closure}(4096, 'Argument 1 pass...', '%s', 6, Array)
  24. #1 %sbug64966.php(6): iterator_apply('')
  25. #2 %sbug64966.php(12): test('iterator_apply')
  26. #3 %sbug64966.php(17): A->b()
  27. #4 {main}
  28. thrown in %sbug64966.php on line 3