xref: /PHP-7.1/Zend/tests/bug64966.phpt (revision 3ae995f0)
1--TEST--
2Bug #64966 (segfault in zend_do_fcall_common_helper_SPEC)
3--FILE--
4<?php
5function test($func) {
6	try {
7		$a = $func("");
8	} catch (Error $e) {
9		throw new Exception();
10	}
11	return true;
12}
13class A {
14	public function b() {
15		test("strlen");
16		test("iterator_apply");
17	}
18}
19
20$a = new A();
21$a->b();
22?>
23--EXPECTF--
24Fatal error: Uncaught Exception in %sbug64966.php:6
25Stack trace:
26#0 %sbug64966.php(13): test('iterator_apply')
27#1 %sbug64966.php(18): A->b()
28#2 {main}
29  thrown in %sbug64966.php on line 6
30