PHP 7 has finally arrived

After about 2 years of work, and a few postponements, PHP 7 has finally been released. I've previously written at length about PHP 7 new features and enhancements but the short version is:

  • Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  • Significantly reduced memory usage
  • Many fatal errors converted to Exceptions
  • Secure random number generator
  • Removed old and unsupported SAPIs and extensions
  • Return and Scalar Type Declarations

What about the major projects, are they ready?

Drupal 8 was recently released, and the core should have good enough PHP 7 support for most people, so you can start playing around with that if you are so inclined.

WordPress has been trying to catch up as well, but I'm not too certain about their current status. I would expect the WordPress core to be running on PHP 7 very soon, if it doesn't already, but I could imagine a lot of plugins having issues.

All maintained Symfony branches has had their test suites passing for a few months, so if your a Symfony developer your main concern should be your own additions.

The Laravel Homestead Vagrant box has also supported PHP 7 for quite a while, so I would also expect Laravel core to be running fine on the new version, even though I havn't found anything official about it.

Trying out PHP 7

If you want try out PHP 7 before you run out and upgrade all of your live servers (this is a good idea™) there's a few ways to do that.

You could of course just download it and install it from source.

If you're running Debian, PHP 7 is already available on the Dotdeb repositories.

As I mentioned it is also available on Homestead if you're developing with Laravel using Vagrant. Alternatively Rasmus Lerdorfs php7dev Vagrant box also supports a range of PHP versions, including PHP 7.

The puphpet Vagrant box builder is sadly still using the PHP 7 nightlies, but I'm hoping that they will upgrade to the final release soon.