Skip to content

Kévin Dunglas

Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, FrankenPHP, Mercure.rocks, Vulcain.rocks and of some Symfony components.

Menu
  • Talks
  • Resume
  • Sponsor me
  • Contact
Menu
FrankenPHP for Windows

Windows Support for FrankenPHP: It’s Finally Alive!

Posted on March 6, 2026March 6, 2026 by Kévin Dunglas

It’s happening! I am thrilled to announce the immediate availability of official Windows support for FrankenPHP.

Since the project’s initial release, this has been by far the most requested feature. While many of you have been successfully running FrankenPHP on Windows via WSL (Windows Subsystem for Linux), native support was the “white whale” we’ve been chasing for a long time.

Today, that chase is over. You can now run FrankenPHP natively on Windows, with 100% compatibility, including our killer features like Worker Mode and Hot Reloading.

Performance That Screams

We didn’t just want it to work; we wanted it to be fast. Early benchmarks from the community are already painting an incredible picture.

One user compared FrankenPHP against an already optimized Nginx/PHP-FPM environment on the same Windows Server 2022 machine. The results speak for themselves: a staggering 3.6x performance boost (an increase of over 260%) simply by switching the server runtime.

Additionally, new extensive benchmarks by @henderkes further validate these impressive gains natively on Windows across various workloads.

A quick tip for maximum speed: While native Windows support is incredibly fast and convenient for development and many production workloads, it is worth noting that for the absolute highest raw throughput, running FrankenPHP via WSL (Windows Subsystem for Linux) still yields more performant results due to Linux’s underlying I/O and networking architecture. In production, prefer using Linux if you can!

The Challenge: A Tale of Two Compilers

Why did it take so long to get here?

Some brave souls tried to port FrankenPHP to Windows early on (huge thanks to them!), but beyond the usual cross-platform headaches (file paths, filesystems), we hit a fundamental, structural wall.

Here is the technical issue in a nutshell:

  1. FrankenPHP is a Go library that calls PHP’s libphp using CGO.
  2. Official PHP builds on Windows are compiled with Visual Studio (MSVC) to ensure the best performance and stability.
  3. Go’s CGO, however, had no support for Visual Studio on Windows. It historically only supported MinGW (GCC).

This left us with a massive compatibility gap. We couldn’t simply link the two together.

The Path to a Solution

We explored several options, each with its own dead end:

Option 1: Add GCC support to PHP for Windows. We considered patching PHP to support compiling with GCC. However, the PHP maintainers (understandably) weren’t keen on the extra complexity. We wanted to guarantee absolute stability, avoid ecosystem fragmentation, and use the official binaries directly, so relying on an alternative compiler than Visual Studio (MSVC), the only compiler officially supported by the PHP project, was a no-go.

Option 2: The “Frankenstein” Build (llvm-mingw). We tried an intermediate solution: compiling FrankenPHP with llvm-mingw and linking it against the official Visual Studio-compiled PHP. This failed because of the Standard Library mismatch. When you mix binaries compiled with MinGW (which uses msvcrt.dll or its own runtime) and MSVC (which uses ucrt / vcruntime), you run into critical issues. If one side allocates memory (malloc) and the other tries to free it, or if you try to pass file descriptors across the boundary, the application crashes. They effectively speak different dialects of “C”.

The Breakthrough: Go 1.26 and clang

We eventually realized the best path forward was to add support to CGO for the Clang/LLVM frontend provided by Visual Studio.

For those unfamiliar, Visual Studio includes a version of Clang that works as a drop-in replacement for the MSVC compiler (cl.exe). It accepts GCC-like flags (which CGO likes) but uses the Microsoft STL and runtime libraries under the hood. It’s the best of both worlds.

While exploring prior art and preparing to write a patch for Go, we stumbled upon an incredible, undocumented contribution from Google that did exactly this.

This patch made it into Go 1.26.

With this new capability in Go, and by using the lld-link linker, we were finally able to compile FrankenPHP using the same toolchain as PHP itself.

100% Green Tests

The result is a native Windows binary that links directly against the official, stable PHP binaries provided by the PHP project.

Crucially, because we link against the official PHP builds, all native PHP extensions supported on Windows work out of the box in FrankenPHP.

We updated the FrankenPHP codebase to handle the remaining Windows quirks, and I’m happy to report that all tests are green.

  • ✅ Native Windows Binary
  • ✅ Full Extension Support
  • ✅ Worker Mode
  • ✅ Hot Reloading

Credits & Sponsorship

This complex work was made possible thanks to the generous sponsorship of Intelligence X and Les-Tilleuls.coop.

Open Source sustainability is hard work. If your company relies on FrankenPHP, Caddy, or API Platform, please consider sponsoring me on GitHub. Your contributions allow me to dedicate time to solving deep technical challenges like this one and keeping the ecosystem healthy and fast.

Try It Now

This support has been merged in Pull Request #2119. You can download the latest binaries for Windows from our releases page!

A huge thank you to everyone who helped investigate this, specifically @TenHian for the initial exploration and @henderkes for the massive work on the final implementation.

Happy coding on Windows! 🚀

Related posts:

  1. The PHP Revolution Is Underway: FrankenPHP 1.0 Beta
  2. FrankenPHP Is Now Officially Supported by The PHP Foundation
  3. FrankenPHP’s New Features: Thread Autoscaling, Mostly Static Binaries, deb and RPM Packages, Caddy 2.10…
  4. FrankenPHP 1.3: Massive Performance Improvements, Watcher Mode, Dedicated Prometheus Metrics, and More

Leave a ReplyCancel reply

Social

  • Bluesky
  • GitHub
  • LinkedIn
  • Mastodon
  • X
  • YouTube

Links

  • API Platform
  • FrankenPHP
  • Les-Tilleuls.coop
  • Mercure.rocks
  • Vulcain.rocks

Subscribe to this blog

Top Posts & Pages

  • Windows Support for FrankenPHP: It’s Finally Alive!
  • FrankenPHP: The Modern Php App Server, written in Go
  • Merry Christmas! FrankenPHP 1.11: Hot Reload, Structured Logging, and More Speed
  • Symfony's New Native Docker Support (Symfony World)
  • Develop Faster With FrankenPHP
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • PHP and Symfony Apps As Standalone Binaries
  • PHP 7: Introducing a domain name validator and making the URL validator stricter
  • Goroutines, threads, and thread IDs
  • Securely Access Private Git Repositories and Composer Packages in Docker Builds

Tags

Apache API API Platform Buzz Caddy Docker Doctrine FrankenPHP Go Google GraphQL HTTP/2 Hydra hypermedia Hébergement Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Mercure.rocks MySQL performance PHP Punk Rock Python React REST Rock'n'Roll Schema.org Security SEO SEO Symfony Symfony Live Sécurité Ubuntu Web 2.0 webperf Wordpress XML

Archives

Categories

  • DevOps (85)
    • Ubuntu (68)
  • Go (21)
  • JavaScript (46)
  • Mercure (7)
  • Opinions (91)
  • PHP (177)
    • API Platform (80)
    • FrankenPHP (15)
    • Laravel (1)
    • Symfony (97)
    • Wordpress (6)
  • Python (14)
  • Security (15)
  • SEO (25)
  • Talks (46)
© 2026 Kévin Dunglas | Powered by Minimalist Blog WordPress Theme