PHP is trying to shove the lack of features from its code base, and Fibers is one of the meaningful additions to the language.  PHP Fibers, incoming in PHP 8.1 at the end of the year, will introduce a sort of async programming (coroutines) into the wild.

The  fiber concept basically refers to a lightweight thread of execution (also called coroutine). These seem to run in parallel but are ultimately handled by the runtime itself rather than by pushing it directly to the CPU. A lot of major languages have  their own ways to implement them, but the principle is the same: Let the computer do two or more things at the same time, and wait until everything is completed.

PHP implementation of Fibers is not true asynchronous computing, as one may think. Indeed, the core of PHP will be still synchronous after Fibers are introduced.

You can think of PHP Fibers as being like switching from one car to another.

#programming #php #web-development #technology

A Look at the New PHP 8.1 Fibers Feature
2.10 GEEK