Now you can test your code against PHP 7 and compare those tests against PHP 5 and HHVM.
PHP 7, the latest version of PHP, is in beta now and is expected to launch later this year. PHP 7 promises to deliver massive performance and speed increases–up to double–than previous versions of PHP.
Here at WP Engine Labs, we’ve added the ability to test PHP 7 in Mercury Vagrant (HGV) 1.5. Mercury Vagrant lets you quickly create a local development environment and test PHP against HHVM. Mercury Vagrant (HGV) 1.5 includes a new toggle feature in WP-Admin that empowers you to simultaneously test and compare PHP 7, PHP 5, and HHVM–simply use the drop down menu in the browser to switch between PHP versions and HHVM.
You can use this new HGV feature to prepare your WordPress sites for PHP 7, which will be available on the WP Engine platform soon.
While HGV is not a direct speed comparison to production level servers, it gives you insight into code functionality and performance. It also provides an opportunity to take advantage of the many debugging tools included in HGV to ensure code compatibility against PHP 5 once PHP 7 reaches general availability.
Our goal at WP Engine Labs is innovation. We strive to provide ways for the open source community to experiment and test bleeding edge technology. We’re excited to include PHP 7 testing in Mercury Vagrant (HGV) 1.5.
If you already have HGV, all you need to do is follow the update instructions to start using version 1.5 now. To install HGV and get started, click here.
If there are features you would like to see or if you encounter any issues, please reach out to us via GitHub.
For more info about HGV, click here!
Also, be sure to check out our Support Garage article for a technical deep-dive into developing with HGV.
Excuse the cynicism, but what’s the point? WordPress will still force us to develop for old PHP for many years to come. They still, after all, have 5.2 has minimum spec. And the next move will probably only be 5.4. So it could be 10 years before we can take advantage of PHP 7 in WordPress land.
Hi Chris, two things:
1. PHP7 makes everything faster regardless of backward compatibility, so that’s important.
2. Just because Core and popular themes/plugins will want to maintain maximum compatibility for maximum applicability, custom code for specific sites don’t have the same pressure, and can take advantage of the new language features as well.