Intermediate
PHP
Q89 / 100
What is PHP's fibers vs generators distinction?
Correct! Well done.
Incorrect.
The correct answer is B) Generators use yield and can only suspend at yield points; Fibers can suspend anywhere in the call stack using Fiber::suspend()
B
Correct Answer
Generators use yield and can only suspend at yield points; Fibers can suspend anywhere in the call stack using Fiber::suspend()
Explanation
Generators are limited to yielding at explicit yield statements. Fibers can suspend at any point in nested function calls, enabling deeper coroutine patterns.
Progress
89/100