PHP 8 pushes PHP 7 away. What is new in PHP 8 if we compare it to PHP 7? In one earlier article from this year we described a kind of problem and also what is changed.
When PHP gets developed it automatically creates problems for many website owners. It is especially noticeable when people use CMS such as WordPress. Normally WordPress takes care of its own updates so the users do not have to think aboutttt every little detail. Themes and plugins on the other side have to be updated by the user.
If we forget updates or if we ignore them we will for sure experience problems. When PHP gets developed there are different things that also get changed. If some functions are changed it will cause problems in themes or plugins if they are used there. That is why we must keep our scripts and programs updated.
What is new in PHP 8 if we compare it to PHP 7? In one earlier article from this year (Determined debugging) we described a kind of problem and also what is changed. We also described how bugs could be fixed.
There are different changes but if we work with most common functions it should not be any problems. The most important things are actually correct database connection in PDO-Mysql and no empty variables. There are of course different risks and we must be ready to debug.
Scripting against bugs
It is only full time developers who can notice and fix bugs in short time but this update should not lead to a disaster if we understand what to look after and how to debug. This time we have also followed a company which had some problems with internal scripting of their user management system and it appeared to be very similar to the problems we described in the earlier article that we mentioned above.
Empty variables should not be used in any form if we want to avoid errors. A simple example here is when we want to give a value from a GET-variable to a new variable. That can happen sometimes and it must be avoided by changing the methods inside our scripts.