Please ensure Javascript is enabled for purposes of website accessibility ab-testing reset calculator camera cart chat-oval-speech-bubbles-symbol-1 check checklist cheers close coding coffee credit-card cursor dollar-circle dollar dumbell gear google-outline google heart heart-empty love high-five image invoice light-bulb loading magnifying-glass location megaphone money question-circle package-box patch pawprint peace pen-tool percentage phone-nav pie-chart plane-tickets plane pointer rocket setting setting-2 Shape spaghetti star support telephone typography user vector-design venn-diagram video-camera-outline writing plus-button fire beer alarm exit alarm beer code-signs coffee-2 like-2 globe pencil right-arrow-circle-alt star-alt Sail badge bell-ring bolt bulb calculator-2 chart-histogram computer confetti crown cursor-2 diamond diploma glass-cheers globe-2 handshake keyboard laptop list-check magic-wand megaphone-2 money-2 mouse-2 phone-call smile-beam sparkles star-2 stats streamline-icon-fantasy-creature-unicorn-418x18-1 streamline-icon-nature-ecology-rainbow18x18-1 streamlinehq-money-graph-arrow-increase-money-shopping-18 streamlinehq-money-graph-search-arrow-increase-money-shopping-18 typewriter users-alt write About Careers Case-Studies Design Development Digital-Marketing Find-Out Get-in-Touch Hosting-Maintenance How-We-Bid Meet-the-Team Operations-Support Our-Work Photo-Video SEO-Content Street-Cred Support-Ticket Who-We-Are pin-2-2 Lifted Logic Web Design in Kansas City clock location phone play play-button chevron-down chevron-left chevron-right chevron-up left-arrow-circle right-arrow-circle facebook instagram google plus pinterest twitter youtube send linkedin portfolio location-pin mailchimp left-arrow right-arrow email reddit checkmark moon sun click mouse volume-on volume-off music restart exit close-thin solid-telephone
Development

Recent 20 Jul 2022

PHP8 Update

Why you should update to PHP8

by Eric Espinosa, Lead Support Specialist

As the Lead Support Manager at Lifted Logic, I and my team do digital surgery to websites all the time. We insert content, ensure all the website components function correctly, and answer all client questions and needs about their websites. Part sherpa, part guru, 100% service. I love what I do.

I spend a great part of my day working with PHP, a code language that gets updated about every 2 years. During those 2 years WordPress coders fix bugs, resolve security patches, and improve performance. After that, the PHP version receives necessary critical updates, but will eventually be replaced by an update with better performance and unique abilities.

Those unique abilities, and frequently the performance improvements, change how PHP operates with plugins and other software. This is part of the fear developers and homebuilders have about adopting a new version of PHP. It’ll break all their stuff!

PHP8 has been around for a while as bugs were worked out and developers scratched their heads. Now, it’s a powerhouse update coming at us, period. Web developers (and homebuilders) need to prepare to use it, because it’s here, and it’s now.

What is PHP8?

PHP stands for “hypertext preprocessor.” This coding language contains HTML code that performs a function. PHP shortens the number of commands required to output HTML, which is great on the wrists of developers who spend all day keying in this language.

PHP also strongly draws developers to use it because the code is executed on the server level. It generates the HTML there, which goes onto the client. The end user sees the results of running the script, but not the HTML script itself. You could even configure your server so that all your HTML files process with PHP, and thereby keep your HTML code to yourself.

PHP language is easy to use for new developers. But being easy to use doesn’t make it lame. PHP offers a robust set of advanced features for us pros. Either way, you can get going pretty quickly with PHP.

Why is PHP8 a big deal?

PHP8 refers to the current configuration of PHP. This version has several changes over PHP7, including:

  • Named arguments. You only have to name required parameters.
  • Attributes. Uses structured metadata with PHP’s native syntax. No PHPDoc annotations.
  • Constructor property promotion. A lot less boilerplate code for defining & initializing.
  • Union Types. Use native union type declarations only.
  • Nullsafe Operator. A chain of calls instead of a long set of null check conditions.

And a bunch more cool stuff.

There really are quite a few changes that will make writing code faster, and make the functioning itself more efficient (like up to 3 times faster!).

As of this writing, a lot of websites have not updated to PHP8. That’s because of their plugins.

So what’s the problem with plugins?

Most WordPress plugins already work with PHP8. However, many people—and especially home-build website creators—don’t want to lose the functionality of their legacy software. As with any update, the software that works with that code would need to be updated, too. That’s where people get lost: working through the maze of updating plugins (and other software) one at a time.

You’ll also have to update WordPress itself, and that presents an issue for someone using truly “old” versions of WordPress.

If you try to update all your plugins at once and something goes wrong, you’ll have to uninstall all your updates to find the bug. You go one at a time, and it’s not the most fun part of your day. Unless you’re kind of geeky (present company included).

Why would I want to update to PHP8 if I’m doing fine right now?

When everything runs great on your website, say, on PHP7, why in the ever-loving world would you want to update to PHP8? I mean, if it ain’t broke, don’t fix it, right?

Nah, not right.

Most PHP versions have reached their end of life. That means even if they’re still working great for you, they will no longer receive security patches.

Hackers run software to crawl the internet, testing for specific vulnerabilities. When they discover them, a bit of code is injected into your site either by the hacker or automatically by the software. This can even provide access to control of your site.

Things hackers do with this code:

  • Install malware and infect others
  • Steal or modify data
  • Sell your data (like credit card info)
  • Sell your hacked access on the dark web
  • Use your data breach as a way into other websites (via your access)
  • Open credit card/bank accounts in your name
  • Request your PIN numbers
  • Oh yeah, there’s more.

Another reason to update to PHP8? Speed. You will work faster typing less. Plus there’s that whole “my site works 1 to 3 times faster” thing. It’s pretty sweet.

Hackers gotta hack. And they’ll do your plugins, too.

You may think your website is armor-plated, but if your old, unsupported plugin pops up on that crawlbot’s radar, boom. You’ve left a backdoor open for jerks to come in and ruin your web party.

Your old plugins can also suddenly stop working. Something else on your site may update, and that changes operation parameters for working with other parts of the website and plugins, and suddenly that important function ceases. Or, it can even “break” your website, and you’re Captain 404 until you can suss out what went awry.

If you’re a homebuilder with a site and this sounds like Dante’s seventh level of programming, hire a pro to help. It will be worth the money if your website is important, and especially if the website is fiscally important.

Just a hint: if you go it alone, be sure to update your WordPress first, and then start one-by-one on your plugins. I recommend you update your WordPress at least once a month. Two times a month is better. And always backup your website first.

Remember that updating allows you to enjoy upgraded benefits:

  • Code runs faster so your website performs better
  • Less cybersecurity vulnerabilities (thwarting hackers)
  • Newest version has longest life before loss of support
  • Access to new features that could improve user experience

How to update your WordPress site to PHP8 with Lifted Logic

Contact support@liftedlogic.com, and let’s see what we can improve together. If we join forces, the process will look something like this:

  1. We discuss the parameters of your site—where it’s hosted, how to access the code, check for daily backups, etc.
  2. We’ll give you a time estimate for costs based on the size of your site. (Ask about the discount for being an Ongoing Marketing client of ours!)
  3. If you approve the estimate, the order goes into our development queue to be completed within the agreed-upon time frame.
  4. We push the changes to a staging site to ensure everything functions as expected before launch.
  5. After quality assurance is confirmed, we push the site live.
  6. You get an updated site ready for you to do your magic!

When should I update my PHP?

If you haven’t changed your PHP version to PHP8, you should probably do so by the end of 2022/beginning of 2023. The end of life for PHP7.4 is November 28, 2022—so the sooner you get this done, the better your confidence can be in the safety and performance of your code.

Dude, where’s my code?

We’re here at Lifted Logic if you need us. We can build an amazing website for you, and we’ll make sure your code is up to code. If you’re interested in having us update your PHP8, get in touch with our support team to get started!

Also be sure to check out all our Lifted Logic blogs for useful info. We teach as well as learn, and we’ll grow with you bit by byte.


About the Author

Eric Espinosa, Lead Support Specialist

Lifted Logic's Technical Project Manager, Eric's the man with a plan. As our in-house site launcher and technical support manager, he's a one-man build-support army. If you've ever needed bug fixing help from LL, you've probably already thanked your lucky stars for his help.