Is Magento ready for PHP 7?

Magento announced officially on January 20th, 2016, that CE and EE 2.0.1 officially support PHP 7.0.2.

Magento Enterprise Edition and Community Edition 2.0.1 are now available and feature important security and functional updates, including official support for PHP7.0.2.

Link: https://magento.com/blog/technical/new-magento-20-resources-and-support-php7


If you are using the most recent version, M CE 1.9.2.2, there is an extension that will bring it to full PHP 7 compatibility: https://github.com/Inchoo/Inchoo_PHP7. (Disclaimer: I'm the author, though there is much help from the community.)

It's also installable through Composer from http://packages.firegento.com/.

All incompatibilities mentioned here are fixed. We think there may still be a few edge cases, but nothing show-stopping. Testing, issue reporting and pull requests are welcome.


No idea about PHP7, but I would guess most of the stuff is still valid in PHP7, you can find more information in the blog of Matthias Geniar

  • ext/mysql: despite it being a very old MySQL extension, I'd reckon it's still very widely used, but it's time everyone moved to pdo_mysql.
  • set_magic_quotes_runtime and magic_quotes_runtime: it seems I've seen these deprecation notices since ... forever?
  • iconv.input_encoding, iconv.output_encoding: so far, I've never had a use for these...
  • # style comments in ini files: hooray for consistency, I've always preferred ; (semicolon) comments in .ini files!
  • preg_replace() eval modifier: hooray for security-minded sysadmins!

I think the only thing we might have in Magento is preg_replace() eval modifier but hopefully not.

Beside this, Magento shipped 1.9.2 with an updated TAF, you can find in dev. With this you should be able to run a bunch of frontend tests on PHP7 and examine the log afterwards