Q. What will be the output?
Code:
function test() {
yield from [1,2,3];
}
foreach(test() as $v) echo $v;
β
Correct Answer: (A)
123
Explanation: yield from delegates generator values.