PHP Traits and dynamic object properties in PHP 8.2+

Here’s a technical post if ever there was one.

I do most of my work in frontend tech these days — HTML, JavaScript and CSS — but there are also certain tasks which require me to delve into PHP. I learned object-oriented (class-based) PHP coding when I worked on TYPO3 projects and all of the code I now write for WordPress is class-based. (The advantages are too complex to list here. Another time, maybe, if anyone is interested. Let me know.)

Anyway. PHP 8.3 landed last week and so I need to through a few dozen WordPress projects on which I provide maintenance through the day job. All but one of them are running PHP 8.x already, so the code changes are comparatively minimal.

(Continue reading this post in my tech blog at markhm.dev.)

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google’s reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

I agree to these terms.

This site uses Akismet to reduce spam. Learn how your comment data is processed.