xref: /PHP-5.5/Zend/tests/generators/bug65161.phpt (revision 0f36224b)
1--TEST--
2Bug #65161: Generator + autoload + syntax error = segfault
3--FILE--
4<?php
5
6function autoload() {
7    foo();
8}
9spl_autoload_register('autoload');
10
11function testGenerator() {
12    new SyntaxError('param');
13    yield;
14}
15
16foreach (testGenerator() as $i);
17
18?>
19--EXPECTF--
20Fatal error: Call to undefined function foo() in %s on line %d
21