PHP 8: everything you need to know about the new update

PHP is one of the easiest programming languages ​​to learn. With a good PHP tutorial and proper motivation, you can write your first scripts and run commands in a few hours. PHP 7 already brought with it a great optimization of the speed, which increased its prestige. With version 8.0, there has been a major update to the open source language .

PHP 8 – Released November 2021

On November 26, 2020, the time had come: with the release of PHP 8.0.0, the latest version of the popular scripting language was released . This corresponds to the typical three-year PHP cycle . The predecessor, PHP 7.4, had been around for about a year, after support for PHP 7.1 ended . At the end of 2020, support for PHP 7.2 is also discontinued.

Many web pages written in PHP still use an old version. Although this is possible, it is recommended not to do so. Keeping the web page code up-to-date and using the newer versions of PHP can bring different benefits. The new versions offer more variety, the performance increases considerably and the security level is higher.

Will there be complications with the old codes?

Since PHP 8 is a new major version, note that some old code will not be supported. Most of the changes that could present complications were already obsolete in versions 7.2 , 7.3 and 7.4 .

The latest changes include:

  • The  real  type
  • Magic quotes legacy
  • array_key_exists ()  with objects
  • FILTER_SANITIZE_MAGIC_QUOTES  filter
  • Reflection  export ()  methods
  • mb_strrpos ()  with encoding as 3rd argument
  • implode ()  parameter order mix
  • Unbinding  $ this  from non-static closures
  • hebrevc ()  function
  • convert_cyr_string ()  function
  • money_format ()  function
  • ezmlm_hash ()  function
  • restore_include_path ()  function
  • allow_url_include  ini directive

If you’ve kept your codeHealth up to date, you won’t have any problem, even with the new update having incompatible changes with previous versions . On the official page of the PHP project you can find a complete list with all the changes.

Leave a Reply

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