Can i upgrade to php 8?

This all begs the question: Should you update to PHP 8, or is it better to wait? Let’s take a quick look at what the latest update contains, and what you should consider before updating.

Want to dive deeper into upgrade process?

Get our eBook - How to Upgrade Your Business to PHP 8

What’s New in PHP 8

While the update does not introduce revolutionary changes in the language, there’s a lot of great stuff in PHP 8 (which you can download here). There are many changes, including named arguments, union types, attributes, constructor property promotion, match expressions, throw expressions, null safe operator, JIT, and improvements in the type system, error handling, and consistency—just to name a few! Head over to the official PHP 8.0 Upgrade Notes for a list of all changes.

On the language front, there are two changes in PHP 8 which deserve special attention:

  • JIT - The Just in Time (JIT) compiler promises to speed up more complex, longer-running scripts. Currently, it can improve code execution performance and will expand and improve over time, as more people tinker with it.
  • Tidy comparison operator - Better comparisons will get rid of frequent bugs and unexpected behaviors that often plague PHP developers. Comparisons between numbers and non-numeric strings now work. Thank goodness!

Should you update now to PHP 8?

The short and sweet answer is ‘Yes.’ 

This is universally true, at least in the world of PHP development. Applications that run on the latest versions of both PHP—and their supporting frameworks and libraries—make it possible to develop new features and maintain the codebase more efficiently. 

Need help with updating to PHP 8?

Sign up for a free consultation 👇

Light Bulb

Regular expert articles and reports

Laptop

Technology industry tips and trends

Star

Keep track of our latest awards

How easy is it to update to PHP 8?

Do your frameworks and libraries support PHP 8? If so, updating should be straightforward. Nearly all the major, popular frameworks now have PHP 8 support enabled.

We’re only a few months behind the new release, so some 3rd party dependencies are still catching up on compatibility and fixes intended for their developers. For instance, legacy PHP codebases, like WordPress, will still run into compatibility issues. 

Lesser-known libraries and packages may be less friendly as well. In this case, each one will have to be updated before proceeding. If you can’t upgrade to PHP 8.0 because of your dependencies, we encourage you to support open-source activities, whether in their development or even in feedback to those who create them. You can always ask or check their Twitter account to get the latest news on their support roadmap for PHP 8.

How much time do you have?

This depends on your current PHP version in use. 

The release of PHP 8 coincides with support ending for versions 7.1 and 7.2. Version 7.3 has now entered the Security Support period, which means it will only receive security fixes. If your application uses any of the above versions (or, horror of horrors, earlier ones) you should prioritize a roadmap for upgrading to PHP 8 immediately! 

If you are on PHP 7.4.x, you still have a whole year to update without worrying about version support. Of course, this means you still won’t have access to the latest features available in PHP 8.0.

Polcode is on PHP 8!

Our first internal application has already been updated to PHP 8 in production. Our projects keep up with the latest releases, so migrating was simple and easy, as most of the breaking changes were deprecated before the 7.x versions. We’re also in the process of migrating a few of our clients to the new version.

If you’re on 7.4.x, the migration guide has all the documentation you need. This resource also contains all of the new features and backward-incompatible changes that you’ll have to look out for when migrating versions. 

Let us know how your update goes. Don’t wait too long!

Get our eBook - How to Upgrade Your Business to PHP 8

On-demand webinar: Moving Forward From Legacy Systems

We’ll walk you through how to think about an upgrade, refactor, or migration project to your codebase. By the end of this webinar, you’ll have a step-by-step plan to move away from the legacy system.

Watch recording

Can i upgrade to php 8?

Can i upgrade to php 8?

Latest blog posts

See more

Ready to talk about your project?

1.

Tell us more

Fill out a quick form describing your needs. You can always add details later on and we’ll reply within a day!

2.

Strategic Planning

We go through recommended tools, technologies and frameworks that best fit the challenges you face.

3.

Workshop Kickoff

Once we arrange the formalities, you can meet your Polcode team members and we’ll begin developing your next project.

Should I upgrade to PHP 8?

Should I upgrade to PHP 8 ? A: PHP 8 provides improved code execution performance and will expand and improve over time. Better comparisons will get rid of frequent bugs and unexpected behaviors that often plague PHP developers. Resulting Increased Speed and optimized performance.

How can I upgrade my PHP version?

How do I change the PHP version?.
Log in to your one.com control panel..
Scroll down to the Advanced settings tile and select PHP and database settings..
Scroll down to Update PHP version..
Select the PHP version you want to switch to and click Update..

Can you produce PHP 8?

PHP 8 is production ready now! To briefly summarize, you can achieve a performance boost by upgrading through JIT (Just in Time) compilation. In addition, your development team will be able to utilize a range of improved language features that make PHP better for enterprise-level projects.

How do I know if PHP 8 is compatible?

PHP 8 compatibility check with these tools.
phan – a static analyzer. ... .
phpstan – PHP Static Analysis and compatibility check..
PHP Compatibility checker for PHP_CodeSniffer..
PHP-Parallel-Lint checks the syntax of PHP files..
There's also PHPStorm for developers..
Upgrading doc in the PHP 8's Github branch..