this post was submitted on 13 Jun 2023
4 points (100.0% liked)

PHP

362 readers
1 users here now

<?

namespace lemmy\php;

/*

Welcome to the PHP community on Lemmy

#Rules:

1: Soon(TM)

#Helpful stuff:

PHP Documentation

Composer

PHP Standards

#Common frameworks:

Symfony

Larvel

*/

echo "Welcome";

founded 2 years ago
MODERATORS
 

What are your thoughts on it? It's performance much better than FPM? Have you used hyperf, or another framework with it, and if so, what do you think about them?

top 2 comments
sorted by: hot top controversial new old
[โ€“] erdemkose@lemmy.world 5 points 2 years ago

You can really get a huge performance gain (+10x) with Swoole or any other event loop. The problem is that they require a different approach in your code and you cannot easily rely on 3rd party libraries anymore. You need to make sure that your app does not have memory leak, and can handle concurrent requests.

If I were to create a new app in PHP, I would definitely consider ReactPHP, Swoole, OpenSwoole, Roadrunner or the latest player FrankenPHP.

[โ€“] buzz@lemmy.world 2 points 1 year ago

I use swoole on a huge monetized US site. I've used the mezzio framework with openswoole, but unfortunately the integration with various swoole features is just not there in mezzio. So I had to backport some hyperf components which is something I would rather not do.

these days I would use hyperf for all of my PHP projects going forward if I cannot migrate them away from PHP, roadrunner would be in the second place.