Why PHP 7.2 Is Important

A while ago, Sebastian said in a presentation that "PHP 7.2 will be a boring release". What he meant by that is that PHP 7.2 does not have an awful lot of fancy new features. Okay, adding the sodium extension to PHP's standard distribution is great, but the majority of PHP developers do not have to deal with cryptography in PHP on a daily basis.

Last week, we finished updating our eBook "PHP 7 Explained" for PHP 7.2. Having done so, we are not so sure anymore that PHP 7.2 really is a boring release. As with every release in the 7 series, PHP keeps getting faster and faster. And we still stand by what we wrote two years ago:

"But this is just the beginning. After many years, PHP – and this also holds true for pretty much every other software project of a similar age – had become more and more difficult to extend, maintain, and optimize. The revamped PHP 7 codebase opens up a whole lot of possibilities for new features and performance optimizations. We will probably see a lot of cool new things in future minor versions of the PHP 7 series. PHP 7.1 has already added some interesting improvements and features. We are sure that PHP's future will be bright and golden, making it a good choice of technology for small and large-scale web projects."

— Bergmann, Blankerts, Priebsch in: "PHP 7 Explained"

The PHP core developers, again, did a great job cleaning up some more sins of the past. With Safe Mode long gone, and the last remains of the infamous Magic Quotes already removed in PHP 7.0, it seems that now, ultimately, also the last remnants of Register Globals have been removed from PHP. If you are not old enough to remember Register Globals, consider yourself blessed. It was probably the worst of all "convenience" features that ever made it into PHP.

Did you know that you can cast a variable to unset? Yes, you can do (unset) $foo; but what does this actually do? Well, it has been deprecated in PHP 7.2. This is another example for changes to PHP that have a small surface impact, but show that the PHP core developers are seriously cleaning up PHP, both the language and its runtime, under the hood. This is not boring at all, it is extremely helpful to take PHP further into the future.

Along with the cleanups that were already done, quite a few things have been deprecated in PHP 7.2, which schedules them for removal in PHP 8. As PHP 7 gets more and more mature, it is time to put PHP 8 on your roadmap, and start to get your code ready for the next big upgrade. If you spend a little time every month to move away from deprecated features, upgrading to PHP 8 will become a walk in the park. So do not wait.

If you are still stuck on PHP 5, it is high time to migrate to PHP 7. PHP 5.6, the last release in the PHP 5 series, is no longer actively supported and only receives critical security fixes until December 2018. This should not scare you:

"Upgrading the version of PHP you use must not be a rare event you are afraid of. You must not think of upgrading your PHP stack as a "special project". You need to make upgrading the PHP version you use part of your normal operational procedure and align the upgrade cycle of your PHP stack with the release cycle of the PHP project. This should be a long-term goal for you."

— Bergmann in: "PHP 5: Active Support Ends. Now what?

Our eBook can help you in getting your code ready for PHP 7. Its PDF edition (you also get it in EPUB and MOBI formats) is now close to 300 pages, jam-packed with insights into PHP 7 and valuable background information that will help you get the most out of PHP 7. Remember: compared to PHP 5, your application will run twice as fast.

For those of you that prefer live interaction, we offer full-day workshops on PHP 7. Our previous PHP 7 workshops were sold out, so hurry up and secure your seat.

Über die Autoren

Sebastian Bergmann
Sebastian Bergmann
Twitter LinkedIn Xing

Sebastian Bergmann ist ein international gefragter Experte, der als Schöpfer von PHPUnit wesentlich zur Professionalisierung der PHP-Community beigetragen hat.

Arne Blankerts
Arne Blankerts
Twitter LinkedIn Xing

Arne Blankerts schuf schon vor Jahren IT-Lösungen, die ihrer Zeit weit voraus waren. Er spürt Sicherheitslücken mit fast magischer Intuition auf.

Stefan Priebsch
Stefan Priebsch
Twitter LinkedIn Xing

Stefan Priebsch findet seit über 20 Jahren mit einer einzigartigen Mischung aus neuen Ideen und erprobten Ansätzen für jedes Problem eine zukunftsfähige Lösung.

Artikel teilen
Putting PHP 8 on the Roadmap Indirect Invocation Considered Harmful