What are PHP Fibers, and how do they enable 'green threading' or concurrency without being true multi-threading?

Last updated 15 June 2026

  • A Fiber (PHP 8.1) is an interruptible function: Fiber::suspend() pauses it mid-execution and resume() continues it later, all on one thread.

  • It is "green threading" because switching is cooperative (no preemption, no OS thread per task). Event loops like AMPHP or ReactPHP suspend Fibers during I/O and resume them when data is ready.

  • Only one Fiber runs at a time, so you get concurrency (overlapping I/O waits) but no parallelism and no shared-memory races.

  • https://faun.pub/php-fibers-a1a3d0fe66f4
  • https://medium.com/@sangeethmsajan123/php-fibers-a1a3d0fe66f4
  • https://medium.com/manychat-engineering/php-fibers-simplifying-async-code-and-speeding-up-development-519d40ace2d9
  • https://php.watch/versions/8.1/fibers
All PHP interview questions