DEV Community

Discussion on: All I want for PHP is 🐘

Collapse
 
andersbjorkland profile image
Anders Björkland

Thanks sobukus. These were some excellent points! Thankfully I started learning PHP with 7.1, and am currently exploring everything neat with 8.1. I haven't gotten to use Slim (I've mostly done Symfony) so I don't know much about it. But it sounds like you are putting it to some real good use. But a small scale framework I've recently checked out is framework-x. It's built upon ReactPHP and make use of Fibers under the hood. I have no idea how it would perform in a race against Swoole but I believe it has a shot.

Collapse
 
sobakus profile image
Sobakus

Very interesting. I didn't know about Framework-X, but looks really neat. I will take a good look at it.

For these things the PSR-7 standard is a real bliss. Swapping different PSR-7 frameworks, like in this case with Slim 4 and Framework-X, should be a breeze.

Swoole is a bit special, as it is not PSR-7 conformant, and uses its own request/response formats. This means that for Swoole you need a small translation layer to make it PSR-7. Not a big deal, but not as clean as it would be if it was already PSR-7 from the get go.

A new toy to play around with! Well, there goes my sleep-time...

Thanks a lot for the hint :)