PeachPie Compiler

Compile and run PHP on top the modern, secure and highly performant .NET runtime.

Get Started Try Online

What you can expect to get out of PeachPie

  • github

    Open source

    PeachPie is completely open-source, licensed under the liberal Apache 2.0. We are also a member of the .NET Foundation, which means you can have confidence in building production apps on top of the project.

  • Both-way interoperability

    Combine PHP and .NET in the same project, seamlessly call classes or libraries between the two platforms and build hybrid apps, choosing whichever language suits your use case.

  • Cross-platform

    PeachPie compiles legacy PHP code into portable class libraries, enabling developers to build cross-platform apps and libraries for Microsoft platforms.

  • Full .NET compatibility

    Compiled programs run on the reimplemented PeachPie runtime, fully compatibly with the PHP runtime. We are also backwards compatible with older version of PHP (down to 4.0).

  • Security

    Distribute PHP apps source-lessly with obfuscated code. Additionally, the standardized and manageable .NET environment makes the code fully verifiable without any unsafe constructs.

  • code-block-braces

    Code diagnostics

    Get static analysis at design time, ensure exceptions and warnings are discovered during the compilation, and leverage the .NET tooling for additional diagnostics and code profiling.

Typical use cases for PeachPie

PHP and C# interop

Integrating PHP into C# or vice versa

Whether your code is in .NET or PHP, PeachPie allows you to take advantage of whichever projects, libraries or classes you prefer, regardless of which of the two they're written in.

The two codebases can work side-by-side within one solution. As everything is compiled to .NET, the whole project can be distributed as a set of NuGet dependencies, you'll benefit from IntelliSense, diagnostic tools and the full spectrum of the .NET toolchain.

Learn more

Code annotations

Migrating a legacy PHP codebase

Many applications are dependent on legacy PHP projects. With PeachPie, you can migrate your PHP code to the modern, fast and secure .NET platform while keeping all of the application and business logic intact and untouched.

You can both migrate gradually or all at once; either by replacing bits of PHP code with modern C# or by swapping out entire pieces or even the whole application with its .NET equivalent.

Learn more

Social cards

Building and developing

The entire .NET ecosystem and tooling instantly become available when you develop your PHP on top of the PeachPie platform. You can debug and profile your PHP code in Visual Studio, VS Code or Rider and get insightful diagnostics at design time.

Since the PHP application runs natively on .NET, developers will take advantage of the entire diagnostic tools, performance profiling tools, exception handling, analytic tools, debugger, and remote debugging capabilities.

Learn more

Support the project

PeachPie is open source and available for free. We develop and maintain it in our own spare time. You can support the project by becoming a Patron - this also gives you access to release builds, blogs and video tutorials, a private Discord channel and more!

Our awesome Patrons will be listed here.

Become a Patron