PHP As You Know It, Is Dead

PHP 5 is dead

php 7.4 eol

Here we go again.  When this post was first published, it focused on PHP 5.6 eol and the need to upgrade to PHP7.
We are now past that point again with PHP 7 no longer being supported and the need to upgrade to PHP8.
PHP 7.4 reached end of life in Dec, 2022.
End of life (eol) in software terms means that the version of software is no longer supported or maintained.
Software goes through life cycles to organize updates made for compatibility. Software changes happen all the time to:

    • add new features
  • fix bugs
  • patch vulnerabilities
  • keep up with changing technology

Sometimes these changes can affect applications created with the software platform. This requires upgrades to your application.
Upgrading from PHP 7 to PHP 8 is not as significant as the upgrade from PHP to PHP7, but there still are some issues to consider.
You can view backward incompatible changes when upgrading to  PHP 8 on the PHP.net website.
Even though PHP is no longer supported, only a small fraction (less than 10%) of websites are using PHP 8 as of  Feb 2022.
Do you know what version of PHP your website is running?

PHP 5 has been dead since Dec. 2018

PHP, like any other software, needs maintained, updated and upgraded. Sometimes it’s a simple tweak, other times it’s a major task. 
PHP5 reached “end of life” in December 2018. End of life (EOL) means that this version of PHP is no longer being maintained, supported or developed. You can still run your website with it, but there are risks.
It will still function, but it means there will be no more:

  • bug fixes
  • vulnerability patches
  • enhancements

You can see unsupported branches of PHP here.
As of August 2019 over 62% of websites running PHP were still using PHP 5 though.
September 2021 –  78.8% of websites that are using a server side language, use PHP.   30% of websites running on PHP are still using this dead version, 5.6.  That is still a lot of old code that needs updated.
View W3techs  for current statistics.

What’s the Big Deal?

Well, from a website owner or user perspective, it really isn’t a big deal . If a website is running, no problem right?!
Sure, that is until your website quits functioning and there is no quick fix. Then you’re in crisis mode.
As long as a web host continues to support the version the older version PHP you are running, you are OK in the sense that your website will still function.  It won’t be secure and it won’t be running as fast as it could be.  Sooner or later though, your host will force you to upgrade PHP on your hosting account (Like Bluehost recently did.) Hosts do not want security vulnerabilities on their servers, so eventually they are going to push you to updating your code. The improvements in speed and security should be enough to encourage you to upgrade your website a priority though.
Most of the time software upgrades are pretty minor. There may be some additions of features, or removal of outdated standards that may require a code edit or two. The upgrade to PHP 7 has a significant change in how PHP connects to a database though. If your site is still connecting to MySQL in the “old way”, your website will no longer function if you try to upgrade to PHP 7.

Related Post:   Hire Someone to Build a Website

“Why am I just hearing about this now?”

Since June 2013, PHP code has been throwing notices in error logs like this:
PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Mysql_Connect Depreciated
I understand that a website owner may be oblivious to this significant change. As a site owner though, you have a responsibility to keep on top of technology to keep your website secure and up to date.
Compare it to when your car has a recall. You may hear something on the news about it, or get a postcard in the mail that gets tossed to the junk pile. It’s up to you to seek this information out and address what needs to be done to fix it.
It has been 8 years now since this change has been communicated. Between your website developer, or web hosting company, or somewhere else, it has probably been mentioned (and possibly ignored) that an upgrade is needed.

Recap: Why Upgrade PHP?

Think about your PC or your phone. They are constantly pushing out code upgrades. You never think a thing of it. You may have auto updates turned on. Or, whenever a notification is pushed to you, you click “ok” and go back to what you were doing. Since every website is a stand alone application, auto updates are a little more scary. (Even within WordPress, each site is customized with a different theme and plugins. So the default install may be the same, but they are all customized differently. Upgrading WordPress code can have complications.)
There are a few really good reasons to keep your PHP code upgraded. The biggest reason I have mentioned is security. Here are a few other

  • Speed – PHP7 is fast. Really fast – like 3x faster than PHP5.6 (I upgraded a site the other day from PHP5.4 to PHP7.3 Page load time decreased from 3.3 seconds to 2 seconds. 60% decrease in page load time)
  • New features – from a web developer perspective – there are new features added that did not exist in prior versions.
  • WordPress wants you to run PHP7 – and keep WordPress up to date! WordPress maintenance is a completely separate post. : )

Upgrading PHP

Once your code is ready for PHP7, Upgrading PHP on your server is pretty easy. You can do it within cPanel with a click of a button. If the option is not there, send your web hosting support a ticket telling them you want to upgrade your website to PHP7.

Website Redesign and Upgrade

If your website is at least 7 years old, and you have not been addressing regular website maintenance, most likely your code is connecting to the database with mysql_connect. This needs addressed in order to upgrade your code to PHP7. There is no way around it. Depending on how large and complicated your website is, along with how efficiently your programmer wrote code, this can be a large or small undertaking. To give you an idea of the level of effort,  I upgraded a website that I coded in 2014. It took me 4 hours to complete. Last month I completed another upgrade to PHP7 on a large custom web application I wrote in 2014. It took me 3 months.

Related Post:   Image Naming - Best Practices for SEO

I can not tell what the level of effort it will take to upgrade your website without being able to log into the web server and review the source code.  If your site is offline and/or you don’t have access to your hosting account, you are probably looking to rebuild your website.

If your site is at least 5 years old, it is most likely time for a website redesign too. Web development standards and technology changes all the time. In the early days of the Internet people were doing website redesigns “for the fun of it”. Websites weren’t complicated. Everything was a novelty (flying envelopes, neon changing backgrounds…)

As websites have developed into extensions of businesses, generating significant revenue though things have changed. Designs often match a company brand and web tools have been developed to incorporate functionality like eCommerce to sell product and services or generate leads. Most likely a significant amount of money has been invested into a business website.

The idea of investing another chunk of money to keep it upgraded seems to be over looked by many. I have multiple clients that I have been telling for years that they need to upgrade their website code. These sites need rebuilt, not some maintenance or minor code upgrades. Each time I mention it, there is some other priority that take precedence. Since all appears to be working ok now, they do not want to be bothered with it. If you don’t do something before its a problem, it will come back and bite you (hard).

All websites should be running the current version of PHP 7. At some point your host will force it. If that happens your website will cease to function if you are using the old way to connect to the database. Can your business afford extended downtime while you search for a web developer to upgrade your website or rebuild it?

How do I know what version of PHP I am running?

There are a couple ways to check what version of PHP you are running. The easiest way if you are not a web developer is to contact your host and ask them. If you are familiar with cPanel you can log in and check there.
The chart below shows supported versions of PHP. As of Jan 2019, PHP7.2 and PHP7.3 are the only actively supported versions. If you are not running PHP7.2+ you should upgrade your website code.

Supported Versions of PHP

Php Supported Versions

If you are running an older version of PHP and are not sure if your code needs upgraded, contact me and I will do a free code review , along with giving you an estimate if the code does need upgrades to be compatible.

Facebook
Twitter
LinkedIn
Pinterest

More Advice

Free Estimate

Do you need help with your website?

Get answers to your questions about hiring a web developer online to outsource website development, WordPress, maintenance and website support.

Do NOT follow