image-zend-blog-how-to-upgrade-php
February 21, 2020

How to Upgrade PHP

Migration
PHP Development

Even though new PHP releases include improved security provisions and an exciting mix of new features, most developers dread PHP upgrades.

Whether your applications have 100,000 lines of code or a million, you can get the tips you need for a successful PHP migration in this blog.

What Are the Key Challenges of a PHP Upgrade?

Typically, the biggest challenges people face with a PHP migration relate to justification and planning. It’s not unusual for PHP applications to have several million lines of code. And the scope of manually migrating applications to a new release can be ominous, especially when it comes to developers’ schedules. That’s because:

  • Developers and managers would rather devote available time and resources to developing new features and apps instead of migrating code to a new release.
  • Migrations don’t always translate into measurable ROI — even though they are necessary. It’s hard to get authorization for a task that delivers invisible benefits.
  • The time sink involved can be significant, especially when teams have little migration experience.

Upgrading to the Latest Version of PHP

Most new releases double application performance. For example, PHP 7.3 performance jumps 2X to 3X for most applications compared with PHP 5. These performance gains can translate into faster response times for users and improved service levels. In addition, application performance gains can sometimes make significant hardware consolidation possible, which can result in thousands of dollars in monthly savings. 

What Are the Benefits of a PHP Upgrade?

A PHP upgrade will help:

  • Improve security, with newer capabilities.
  • Ensure your applications are supported, either through the community or from Zend when you use ZendPHP Enterprise or Zend Server.
  • Reduce the risk of breaches that can damage reputation and cost money.  
  • Save time and money with new capabilities that help teams deliver better web applications, faster.

For more information about new capabilities in PHP 7.4, refer to this blog: What’s New in PHP 7.4.

For poll information about why organizations resist upgrading — and tips for overcoming — read this blog, Why Development Teams Should Upgrade PHP

Planning a PHP Upgrade

There are two things I always stress when it comes to planning PHP upgrades:

  • Schedule extensive tests - Testing goes alongside migration success. Be sure to fully test your application using a variety of PHP testing techniques.
  • Migrate code in small sprints - Break your migration into small sprints for better results.

Is Testing Really Needed?

Yes, you need to test your apps — even if your resources are spread thin. Corporate web applications support customers. To ensure every single person has a seamless, reliable experience, you need to test.

Testing becomes more feasible if you do it as you make changes. Waiting to run all your tests until you are done with your code migration will make it much more difficult and time-consuming to pinpoint issues and their causes.

I recommend making one change, and then testing it. Repeat this cycle until the migration is complete. In one day, our developers typically make and test 10 to 14 small changes.

Streamlining Your PHP Upgrades

If you want to manage your own PHP migration, the tools in Zend Server can help. With Zend Server, you gain:

  • Real-time monitoring and debugging tools that are built into the PHP runtime, so you get more detailed insight compared with other PHP debuggers.
  • The ZendPHP Enterprise runtime, which comes with security enhancements that are not included in the community edition.
  • Comprehensive mission-critical PHP support for releases for a minimum of five years past the initial release data — which is longer and more intensive than what you get from the community.

Many companies engage Zend PHP Migration Services for help with PHP upgrades. Why? Our PHP consultants

  • Are highly skilled in migrating applications of all sizes, including those with millions of lines of code.
  • Work in short sprint cycles, making 10 to 14 small changes each day with quick feedback loops.
  • Meet their time estimates so you get accurate time and cost estimates.
  • Work with your cadences, processes, tools, and teams — instead of dictating how things should be done.
  • Ensure that when your migration is done, user experience is the same or better. There are no new bugs or loss of functionality.
  • Help you consolidate infrastructure if desired, by maximizing the performance gains that come with newer PHP versions.
  • Ensure backwards compatibility with earlier versions of PHP if desired.

Questions?

LEARN MORE ABOUT Zend PHP Migration Services

Want to try the comprehensive monitoring and debugging tools in Zend Server — along with the peace of mind that comes with enterprise support for PHP?

START FREE ZEND SERVER TRIAL

Additional Resources