1--TEST-- 2Yielding the result of a non-ref function call throw a notice 3--FILE-- 4<?php 5 6function foo() { 7 return "bar"; 8} 9 10function &gen() { 11 yield foo(); 12} 13 14$gen = gen(); 15var_dump($gen->current()); 16 17?> 18--EXPECTF-- 19Notice: Only variable references should be yielded by reference in %s on line %d 20string(3) "bar" 21