PHP 7.4.0. – Core Features

In case you’ve missed… New major (7.4.0.) PHP language version has been released lately.

We wanted to outline some of the most important changes for you if you are considering to use the new version for the project you are working on.

We shortlisted the most important changes to the following:

  • Class properties now support type declarations.
  • Arrow functions provide a shorthand syntax for defining functions with implicit by-value scope binding.
  • Numeric literals can contain underscores between digits.
  • Weak references allow the programmer to retain a reference to an object that does not prevent the object from being destroyed.
  • Allowing Exceptions from __toString(). Throwing exceptions from __toString() is now permitted.
  • Previously this resulted in a fatal error. Existing recoverable fatal errors in string conversions have been converted to Error exceptions.
  • Support for Opcache preloading code has been added.
  • Several Deprecations were made. You can find more details here: https://www.php.net/manual/en/migration74.deprecated.php
  • These extensions have been moved to PECL and are no longer part of the PHP distribution:
    – Firebird/Interbase
    –  Recode
    – WDDX

    (The PECL package versions of these extensions will be created according to user)

    Please see PHP migration guide available in the PHP Manual to find out more about the new features and migration information.
Pin it
Leave comment