1--TEST-- 2Generator shouldn't crash if last yielded value is a closure 3--FILE-- 4<?php 5 6function gen() { 7 yield function() {}; 8} 9 10$gen = gen(); 11$gen->next(); 12 13echo "Done!"; 14 15?> 16--EXPECT-- 17Done! 18