Hacker News new | ask | show | jobs
by EGreg 8 days ago
FrankenPHP uses Go. This is pure userland PHP. No other dependencies.

For one thing, developers who actually code in PHP need a web server. This "just works" out of the box. No need to install Go, or Nginx, or php-fpm, or configure proxy_pass, or certificates, etc. etc. Yes, caddy also handles certificates, but what about the rest?

There is a section in the README comparing this to FrankenPHP, Swoole, etc. You can see where this approach actually beats them. In fact, instead of simply declaring "it sux", why not try it first? It takes 5 minutes. Download and launch.

And a word about about safety. FrankenPHP workers persist between requests, which means every static variable, singleton, and global cache in your app -- and every library you use -- becomes a potential data leak between users. Qbix Server gives you the same performance benefit (zero bootstrap cost) via fork-after-preload, but each request gets its own process. When it's done, everything is gone. No audit needed.

1 comments

Go is not a dependency. Go is a compiled language, once you download the frankenphp binary you do not need anything else, whereas you still need php for yours.

The readme is fully ai generated so its not a great start, but I checked anyway and yes the only thing I agree with is the lack of X-Accel-Redirect which really bother me.

I know about safety I'm literally in the process at work of going through our app to check for this exact issue since we are moving to frankenphp. And it's quite easy, unless you did something REALLY WRONG in your app, it's just a matter of implementing the ResetInterface [0]

[0]: https://github.com/symfony/contracts/blob/main/Service/Reset...

It’s quite ironic that you are pointing out I still need PHP to run … PHP. Whereas if I download a Go binary, then I won’t.

Well, I can do you one better — you can compile the entire server and PHP code to a binary, as it says in the README, so you won’t need ANYTHING once you download that LOL.

Also, since you wrote that comment, I also added supports for websockets (wire-compatible with socket.io) and rooms, all of it with the same approach: put files in folders and it “just works”. What is so bad about that?

You are really putting bad faith and being stubborn.

Yes you will need SOMETHING since you have to get your thing someway to compile this executable. Just as you'd need frankenphp to compile a single binary just as you that will then not require anything.

Great, it's a good thing to have websocket support it's clearly lacking in the php world.