Next Midgard will be PHP5 only


It took us a while to get here, but Midgard is finally entering a release cycle which will drop support for PHP4. The reasons are quite clear: simplicity and speed.

The whole PHP4 end of life business has caused quite a bit of discussion in the PHP community. Especially Matt Mullenweg from WordPress has raised vocal opposition. Commenter Johan Delinger said well:

The problem of PHP 4 is its own success. Its so big of a success that it is hard to get people to the (sometimes incompatible) next generation versions. It is definitely the apps working with PHP 4 that drive people to use PHP 4, not PHP 4 itself. If crucial apps, like phpMyAdmin were developed for some other technology at their time, then that would become the de-facto everywhere installed programming environment to work with.

Why Midgard can choose

Midgard’s situation differs quite a lot from most other PHP applications. Since much of Midgard works on Apache module and PHP extension space the users of the framework are not usually relying on hosting providers and their versions but instead run their own servers.

This makes us free to focus on the PHP version (and other dependencies) that work best with our framework. Midgard core developer Piotras has estimated that some Midgard functionalities like Query Builder will be substantially faster on PHP5.

An important point also is that the PHP part of Midgard is MidCOM, a quite large object-oriented component framework. While MidCOM has been possible to develop on PHP4, new OOP features in PHP5 will make the code much easier to develop and understand.

March to Midgard 2

Another reason for making the PHP5 switch now is that Midgard 2 is coming soon. I wanted to have a Midgard 1 series release requiring PHP5 before that just to play safe. Otherwise many users would find themselves trying to upgrade to PHP5 and Midgard2 at the same time, never knowing which one was causing a problem with their code.

Read more Midgard posts.