Which of the given code statements should replace ??? in the following PHP 7.1 code snippet, so that 7, 6, 5, 4, is printed as output?
function &example() {
$var = 8;
while ($var > 4) {
yield $var;
}
}
???
}
?>
Correct Answer:
foreach (example() as &$num) {
echo (--$num).', ';
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP 5 MCQ Questions