PHP Fibers does not do anything on its own. Its basically just syntax for generators, to be used with various external runtimes.
This means in a vanilla PHP setup when i do something like this:
$a = new Fiber(function () {
sleep(2); // block
Fiber::suspend();
return null;
});
$b = new Fiber(function () {
sleep(2); // block
Fiber::suspend();
return null;
});
// Start execution
$a->start();
$b->start();
// ... later in code wait for both executions to finish
$a->resume();
$b->resume();
// Total execution time is not 2 seconds, but 4
I need an additional runtime to support real concurrency. I also need a separate async IO library to handle blocking. This is usually a showstopper for most PHP still out there. And just annoying on so many levels.
The best, most popular serverless platform? There are stacks much worse than PHP, like JVM for example ;)
It (JVM) is getting better lately, for example with virtual threads, but still in same resources you can handle much more traffic via PHP and it can be hosted virtually on every hosting!
Not sure why you say JVM is "worse" than PHP. It handles most real world workloads with no problem and is probably one one the most fine tunes VMs out there. It supports concurrency out of the box.
That said JVM is only a target, so if Java is not your cup of tea, you are free to pick and choose from any of the various JVM languages, like Clojure, Kotlin, Scala etc.