I'm following the list of backward incompatible changes while upgrading my code from PHP 7.4 to PHP 8.

It says that match is now a reserved keyword. DaniWeb's matching algorithm has many instances of the variable $match, the function match() and even a class named Match. What do I need to do in order to upgrade?

Recommended Answers

All 3 Replies

So, best I can tell, leaving the variable $match is fine, but classes and functions need to be renamed.

Since "match" is now a reserved keyword in PHP 8, you'll need to update any instances of the variable $match, the function match(), and the class Match to use a different name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.