Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

PHP-PM grows up to be a credible option for high performance PHP

PHP-PM is a novel way of running PHP applications. Instead of creating an exotic high performance runtime for the PHP language, it takes an alternative route to mechanism of running PHP applications with existing runtimes.

This translates to real performance gains with existing complex applications, not just impressive theoretical benchmark results.

The approach PHP-PM takes is running PHP applications as processes that reduce the continous bootstrapping that has always been a hallmark of PHP applications. This site has discussed this approach before and even done some benchmarks with impressive results with real life applications:

PHP-PM benchmarks

PPM logo

Just a few months ago in the first months of 2016 the PHP-PM project looked more of an continuation of the experiment done with Symfony way back in 2014. But coming to the end of April, the project has picked up steam and has become a more credible effort.

Starting with a clean logo, but continuing with better documentation, wider support and ease of use. All of this boils down to the increased efforts of the project lead Marc J. Schmidt which is illustrated in the project's GitHub activity graph:

PHP-PM project activity

While it feels this added velocity is coming from a single developer, the PHP world has moved forward an the Symfony HttpKernel component is now more widespread thanks to many mainstream projects taking it into use.

There are still lots of legacy PHP application architectures like WordPress that are hard to re-engineer to work with isolated HTTP requests, a PHP-PM requirement. But there is also an abundance of potential compatible software out there for various use cases ranging from mainstream content management to webmail applications built with PHP.

From the humble beginnings the PHP-PM now has over 1700 stars on GitHub and a number of developers working on it. Great strides have been done since the early stages with the documentation and ease of use, but most importantly the platform now supports multiple frameworks:

  • Symfony
  • Zend
  • Laravel

In addition to these general purpose web frameworks, tools with more limited scope like Drupal 8 can take advantage of PHP-PM too - thanks to the Symfony components under the hood. But perhaps the most significant move, though is the addition of the PHP-PM PSR-7 adapter on April 21st from Franz Liedke:

PSR-7 is the standard set by the PHP-FIG for HTTP Message interfaces. This is something that is well specified and supported by a number of PHP Frameworks, including Slim PHP, Symfony and Zend Expressive. Try free trial for high performance VPS on UpCloud.

If the momentum from the early months of 2016 continues, PHP-PM could well become the defacto standard of running PHP applications in this novel way - similar to how PHP-FPM became the current gold standard for high performance PHP.

This is potentially a big win for developers and clients who want high performance and low latency APIs done with existing large PHP codebases. Or brand new ones, built with the Symfony Microkernel, for example.

Learn more about PHP-PM:

Written by Jani Tarvainen on Sunday April 24, 2016
Permalink - Tags: php, php-pm, performance

« Local Symfony events in Paris, Oslo, London and Cologne this April - Exotic PHP implementations: HippyVM, JPHP, Tagua VM, Peachpie »