The PHP language compiler for .NET Framework

Main menu

About Miloslav Beňo

Miloslav graduated at Faculty of Mathematics and Physics at Charles University in Prague. He is developer of open-source PHP language compiler called Phalanger. Beside of compilers and dynamic languages he is also interested in semantic web technologies. Available on twitter @miloslavbeno

Phalanger was capable of compiling WordPress for quite a long time, but this support was always targeted at developer audience. Experienced developers could compile WordPress and run it on their servers. However, we noticed that the combination is interesting not only to developers, but also to end users. Some of WordPress users want to run it on .NET or on Mono. Mainly for performance reasons, but some of them also because they already have other stuff running on .NET. The problem was it is quite a tough job to install Phalanger, configure, compile… don’t mentioning that on shared hosting it can be a problem to install anything.

The main goal of Phalanger is to provide fast and easy means for PHP and .NET languages to interoperate with each other. When using Phalanger, PHP becomes a .NET language, but it’s still a dynamic language. That means that, in order to communicate with strongly typed languages as C#, we need more sofisticated architecture. This comes with DLR (Dynamic Language Runtime) and dynamic keyword in C#. Continue reading →

EDIT: This is detailed tutorial mainly for Windows. Now there is a package of WordPress with embedded Phalanger which is prepared both for .NET and Mono. You can download directly from http://wpdotnet.com

WordPress is an open-source content management system (CMS) built using PHP and MySQL. It’s one of the most frequently used solutions for blog publishing. In this article I describe how to compile this PHP application to .NET Framework 4.0 using Phalanger.