1--TEST-- 2try { yield } finally { return } 3--FILE-- 4<?php 5function foo($f, $t) { 6 for ($i = $f; $i <= $t; $i++) { 7 try { 8 yield $i; 9 } finally { 10 return; 11 } 12 } 13} 14foreach (foo(1, 5) as $x) { 15 echo $x, "\n"; 16} 17--EXPECT-- 181 19