1--TEST-- 2Bug #63066 (Calling an undefined method in a generator results in a seg fault) 3--FILE-- 4<?php 5function gen($o) 6{ 7 yield 'foo'; 8 $o->fatalError(); 9} 10 11foreach(gen(new stdClass()) as $value) 12 echo $value, "\n"; 13?> 14--EXPECTF-- 15foo 16 17Fatal error: Uncaught Error: Call to undefined method stdClass::fatalError() in %s:%d 18Stack trace: 19#0 %s(%d): gen(Object(stdClass)) 20#1 {main} 21 thrown in %sbug63066.php on line 5 22