FrankenPHP: The Modern PHP App Server

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Nutrient - The #1 PDF SDK Library
Bad PDFs = bad UX. Slow load times, broken annotations, clunky UX frustrates users. Nutrient’s PDF SDKs gives seamless document experiences, fast rendering, annotations, real-time collaboration, 100+ features. Used by 10K+ devs, serving ~half a billion users worldwide. Explore the SDK for free.
nutrient.io
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. frankenphp

    🧟 The modern PHP app server

    It might shock you that I wrote perl before PHP... I have been in the game a LONG time. I was around for php being the language that EVERYONE shit on. I was around when PHP got somewhat huge and respectable. PHP buttered my bread for a number of years and I was one of its bigger advocates.

    My lament here isnt about PHP at all.. It's about the instructions here: https://frankenphp.dev/docs/embed/ to generate a monolithic binary... It's about the execution of this script https://github.com/dunglas/frankenphp/blob/main/build-static...

    None of that is very go like at all. Having spent a lot of time with PHP I recognize a good portion of what turns up in that shell script. That having been said there are parts of it (the curl of the diff) with NO context that I would pause and go figure out what the hell that was. It really needs a note as to WHY it's there so I dont have to go hunting. It looks like the shell script is meant to work in the docker container... A real build system might be in order here (make, basel, mage).

  2. Nutrient

    Nutrient - The #1 PDF SDK Library. Bad PDFs = bad UX. Slow load times, broken annotations, clunky UX frustrates users. Nutrient’s PDF SDKs gives seamless document experiences, fast rendering, annotations, real-time collaboration, 100+ features. Used by 10K+ devs, serving ~half a billion users worldwide. Explore the SDK for free.

    Nutrient logo
  3. frankenwp

    > Unlike Laravel and Symfony, WordPress doesn't support the worker mode of FrankenPHP (yet?), so there are not many benefits in terms of performance (except the ability to preload assets using 103 Early Hints, which can reduce the latency of a page load by 30%).

    This part is clear for me, but thank you for mentioning HTTP 103 too. I will not state for sure, but in my blurry memory, FPHP (FrankenPHP) was _slower_ than Apache+mod_php in that tests. But again, I won't say for sure, I just remember I was totally impressed as was expecting otherwise - much likely some subtle differences in setup on my side. If/when I have more precise info - I may ping you.

    > That being said, FrankenPHP makes it easy to enable HTTP cache with WordPress and simplifies the deployment story. There is a dedicated project for WordPress and FrankenPHP, that comes with a built-in HTTP cache tailored for WordPress (using the Souin Go library): https://github.com/StephenMiracle/frankenwp

    Thank you, have not seen that yet - may get idea or two from it. At glance, they just do naive `BYPASS_PATH_PREFIX` handling and that's all.

    Beyond tests, I of course do prefer Nginx over Caddy and "simplifies the deployment story" doesn't resonate with my needs much yet - one of that things may change of course.

  4. FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

    Interested to see how this fares on Tech Empower's benchmarks: https://www.techempower.com/benchmarks/#hw=ph&test=fortune&s...

    At the moment it is at the bottom as a "did not complete"

  5. go-pher

    The PHP of Go.

    Reminds me of that time 10 years I tried to make Go more like PHP instead of the other way around: https://github.com/blixt/go-pher

    More seriously, happy to see worker mode in this server. PHP does come with several performance downsides, though I’m sure a lot of them have been worked around in the past decade. I don’t think I’d do PHP again though if I’m being honest.

  6. Swoole

    🚀 Coroutine-based concurrency library for PHP

  7. grpc

    :electric_plug: RoadRunner GRPC SDK (by roadrunner-php)

  8. ext-openswoole

    Programmatic server for PHP with async IO, coroutines and fibers

  9. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  10. sqlc

    Generate type-safe code from SQL

    >> Also, I can think of a number of json schemas that are impossible to replicate in Go's type system but work just fine in PHP.

    Not at all. There are some that would be painful to write "by hand". An expansive and nested set of null fields would suck if I had to spell it all out...

    https://sqlc.dev << changes everything. If you add in the YAML (and I hate yaml) you can get your JSON to DB mapping in there, as well as your validations (all output as struct tags).

    Everything else that you're going to want (transforming inputs to/from json, logging, auth) is some pretty simple middleware.

  11. symfony-docker

    A Docker-based installer and runtime for Symfony. Install: download and `docker compose up`.

    Your .dockerignore is supposed to filter out for you. In the Symfony default implementation, you have this file you can use:

    https://github.com/dunglas/symfony-docker/blob/main/.dockeri...

  12. ngx-php

    ngx-php - Embedded php7 or php8 scripting language for nginx module. Mainline development version of the ngx-php.

  13. Workerman

    An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.

  14. React

    Event-driven, non-blocking I/O with PHP.

  15. keepalived

    Keepalived

    It's a tool you tend to come across when you're building highly available network systems, https://github.com/acassen/keepalived .

    You might use it to implement redundancy in the load balancer layer of your system, perhaps your firewall round-robins incoming connections between two IP:s where you have nginx proxying to share load between two mirrored clusters, and those IP:s are virtual and handled by keepalived that will shuffle in a backup virtual server if the one currently serving becomes unhealthy or needs to be switched out due to a config rollout or something.

    It's a really neat way to be able to just throw more virtual servers at the problems in availability, redundancy, load balancing and so on. I think it does some ARP messaging to achieve this.

  16. Serde

    Robust Serde (serialization/deserialization) library for PHP 8. (by Crell)

    > Go has typed container types while PHP has not.

    I suggest looking at https://github.com/Crell/Serde, if that is a requirement in PHP.

    > PHP is more convenient at another common case which is heterogeneous maps.

    Or arbitrary, user-defined keys...

    > If you want/need to walk through it in a single pass fashion, then Go is definitely more fitting.

    array_map, array_reduce, array_column is pretty good at walking through arrays very quickly, assuming you parsed the json into arrays instead of objects.

  17. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Swoole (Coroutine-based concurrency for PHP) v6 released

    1 project | news.ycombinator.com | 16 Dec 2024
  • Connecting to PHP using Apache's mod_proxy_wstunnel without using 3rd Party APIs

    3 projects | /r/codehunter | 7 Jun 2023
  • I made a simple chat socket server

    2 projects | /r/PHP | 11 Feb 2023
  • Weekly help thread

    2 projects | /r/PHP | 8 Feb 2023
  • Amphp 3.0.0

    1 project | news.ycombinator.com | 3 Jan 2023

Did you know that PHP is
the 14th most popular programming language
based on number of references?