Progress toward full PHP compatibility

We’ve been a little less active with blog posts and announcements lately, but it’s not for a lack of activity around the PeachPie platform. Let’s take a look at the current state of PeachPie and how compatible we are with the plethora of PHP applications out there.

Leveraging the open source community

PeachPie has been an open source project since the very beginning, using one of the most liberal open source licenses (Apache 2.0) and has been a member of the .NET Foundation since 2017. The choice to host the source code of the PHP compiler to .NET publicly under a non-restrictive license was an obvious one, as a technology like this can’t succeed or spread without the support of the community. And since the start, there have been:

  • 14 contributors outside of the core team, including the man himself:
Microsoft’s Scott Hanselman contributed to our WpDotNet SDK
  • 300 issues across the main PeachPie repo and its peripherals
  • Over 150 pull requests submitted and merged/closed
  • Over 9000 individual installs of our Visual Studio and VS Code extensions
  • Just shy of 400,000 page views of our website since 2016
  • An estimated 20,000 total users of PeachPie

Not too bad for a project in version 0.9, although admittedly not for much longer as 1.0 is just a matter of a little bit of code cleanup and some surrounding efforts; more on that later.

Immediate impact

Besides the obvious fact that providing the source code helps developers familiarize themselves with this technology and file bug reports or improvement PRs, PeachPie is perfectly suited as OSS for another reason. Believe it or not, we are no experts on PHP. PeachPie is an implementation of the PHP language completely in C#, and while we of course had to acquire some knowledge of this platform, we certainly wouldn’t consider ourselves experts. And while we have some degree of expertise in the language itself, we most definitely cannot specialize in the gazillions of popular PHP apps and frameworks out there.

In order to be compatible with such, e.g. WordPress, Symfony, Laravel, Drupal etc., you need at least some level of understanding of their mechanics, which takes some time. This is why help from developers who are experts is so crucial for us. Lately there has been some serious progress courtesy of our community:

  • WooCommerce: our long-time supporter Daniel Llewelyn has successfully compiled and activated the globally most widely used e-commerce app running on .NET. He’s also working on creating an API around it and distributing it as a NuGet. You can find the repo here.
  • Laravel: Calvin Baart has been supremely helpful in addressing issues within this framework and submitting phenomenal PRs. Take a look at the repo, in which he is working on Laravel on .NET, which already runs with just a few minor workarounds. 
  • Symfony: another massive framework we would have to completely familiarize ourselves with in order to compile and run. We are supervising a student’s Bachelor thesis, whose objective is to compile this framework and distributed it as a .NET NuGet. See the progress here.
  • Nette: many of you likely never heard of it, but in the Czech Republic, this framework powers a sizeable portion of the local sites. With the help of a solution architect from Microsoft, we’ve been adding functionality to PeachPie in order to get this framework running on .NET.
  • Drupal: according to, Drupal is the second most popular CMS in the world and in fact more prevalent among larger sites. We have a repo set up for this framework here, but its dependencies on Symfony and other major components mean it will likely be a while before we can run this CMS on .NET.
  • Magento: another popular e-commerce CMS, now part of Adobe, is being worked on by a member of our community. The repo can be found here.

The contributions are extremely appreciated, especially when they come in the form of isolated and well described test cases or properly structured PRs. 

What’s Next

As mentioned earlier, not much is missing before we release the first stable version of PeachPie. We are doing a bit of code cleanup and minor performance improvements, but most importantly we’re currently working on some tooling and services that will significantly simplify your work with the PeachPie platform. We already have SDKs for our instance of WpDotNet and components provided as NuGets, but what we’re working on right now will bring it all together.

So long, HHVM

Last year, the HHVM team officially announced that the project would no longer be supporting the PHP language and would instead focus on the re-implementation of PHP Facebook is now running on: Hack. HHVM has been a major inspiration for us, so while we’re sad to see this project move to another direction, it means that PeachPie is now the only project capable of compiling and running PHP apps on a different runtime, compatible with current, older and upcoming versions of PHP. HHVM’s objective has always been performance, but in fact newer versions of PHP even started outperforming HHVM, causing WordPress to exclude it from its testing infrastructure back in 2017. Here’s what John Blackbourn, a WordPress core developer had to say about that:

If you’re running a WordPress website on HHVM, you should consider switching to PHP 7+ which is far more widely supported and tested, and offers all of the memory and performance benefits that HHVM pushed forward.

John Blackbourn

While PeachPie still aims to be more performant than PHP going forward, we also provide other major benefits: bi-directional interoperability with .NET applications and increased security through the .NET framework. To be clear, we’ve only done some very basic performance work, and these optimizations will be a core focus going forward. We’re also particularly excited about .NET Core 3.0, which looks quite promising:

Posted on April 29, 2019, in category Information, News, tags: , , , , , , ,