MCQs > IT & Programming > PHP 5 > Which is the correct syntax for a function with iterable generator return type?

PHP 5 MCQs

In PHP 7.1, which of the following is the correct syntax for a function with iterable generator return type?

Answer

Correct Answer:

function example(): iterable {

yield 1;

yield 2;

yield 3;

}

?>


Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More PHP 5 MCQ Questions

search

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it