Skip to main content

Ansible PHP7 (Ubuntu)

You can download and use the role here: https://github.com/litwicki/ansible-php7

roles/php7/tasks/main.yml

 

Using Ansible + Vagrant to build a PHP7 LEMP Stack!

I have recently fallen deeply in love with Ansible; thanks largely to my new position at Fresh Consulting. As such I’ve found it incredibly fun to tinker and learn in my spare time and recently decided to tackle PHP7 for a variety of reasons. My pet project CamelotHub was a perfect playground, and I’ve managed to take a playbook from phansible and modify it to build a stable LEMP stack using PHP7, PHP7-FPM, and NGINX 1.9+

PHP7, Focusing on Performance in a Big Way!

PHP has historically been marred by its own ease of use. That is to say the flexibility and lack of restrictions upon using PHP have led to some historically sloppy code and a general misunderstanding that PHP cannot handle prime time application development. That’s largely been the focus of industry experts the last several years, particularly emphasized by the efforts of Facebook and HHVM.

Recent research by Zend showed 25% of Enterprise “users” (that is, engineers, architects, and developers) were concerned or challenged with PHP’s performance. This has historically been the tipping point for major software applications to balk at PHP in favor of Java or Ruby.

Now that the community has voted on the next major release of PHP being PHP7 the core components of said release are extremely exciting.

The most significant of which is a substantial dedication to performance improvements:

Thanks largely to the integration of phpng PHP7 will have major performance improvements. Up to 95% improvements according to some benchmarks!

Davey Shafik did a fantastic overview of the major changes worth reading and I encourage anyone to do so. There is also a formal write-up by Zend covering the5 things you must know about PHP7.

Ultimately, this is an exciting time to be part of the PHP community as there very well be a significant paradigm shift regarding the perception of legitimacy of PHP as an enterprise stack solution for web applications.