Skip to content

Seamlessly port legacy PHP code to the modern, cross-platform, lightning-fast .NET

Why it matters

As businesses are started, they typically pick the technologies that simply allow them to go to market the quickest. They don't usually think about future performance or whether the technology will be around 5 years from then. However, as the apps grow in size and complexity, legacy parts often become obsolete and their maintenance turns into a serious nightmare.

What you get

PeachPie allows you to migrate PHP code to the modern, fast and secure .NET platform while keeping all of the application and business logic intact. As a result, you can switch to .NET significantly more quickly and in a less risky matter, and you can gradually replace portions of your legacy PHP app with C# to migrate over to .NET step by step. Since PeachPie is backward compatible with older versions of PHP, it also enables you to utilize constructs from PHP 8+ in your legacy PHP 5 code.

The existing PHP codebase will run on top of the .NET stack, including Azure Cloud, ASP.NET server providers, integration with C# projects, and eventually making use of analytics like Application Insights. The development process will transform into the use of .NET development tools and runtime. There won’t be any native PHP runtime on the server or your development machines at all.

The PHP code is meant to be further maintained and updated since the migration is not a one-way process. By contraries, once the application is treated as a .NET project, it reveals a continuous code diagnostics, making your project better and safer.

Moreover, source files won’t have to be published to the server anymore, and therefore they will be kept in private. Since PeachPie introduces the compilation phase to the PHP application, the project is built, the entire code gets diagnosed, validated, and eventually strongly signed.

This process is natively supported by Azure DevOps, Microsoft Visual Studio, .NET CLI, and other .NET development platforms.

Case in point

Our client from the retail industry had a legacy e-shop that was posing a significant performance bottleneck in peak traffic. Seeing as the rest of their stack was in .NET, they looked for a suitable alternative in C#, but nothing was as user-friendly as the PHP alternative. Eventually, they decided to re-use their existing codebase on top of PeachPie. Over the next years, the client gradually replaced parts of the legacy app with C#, eventually migrating almost fully to .NET.

References:

  • Creating an ASP.NET Core app


    See Microsoft's documentation on how to get started with ASP.NET Core.

    Learn More

  • MSBuild items


    Learn more about what items you can input into the build system.

    Learn More

  • Project file reference


    How to set up your MSBuild project file - the basic XML file that describes the build process and other properties.

    Learn More

  • MSBuild project items


    Understand the common MSBuild project items.

    Learn More