PHP 8 is here!

PHP 8 is here!

PHP 8.0 has just been released today. The new version brings a slew of great new features, such as:

  1. Just-in-time compiler that speeds up code execution,
  2. Union types that allow you to define a type as a combination of other types (for instance a function that accepts int or float
  3. The match expression, enabling a shorter way of writing switch-like statements,
  4. The nullsafe operator, enabling null coalescing on metods,
  5. Named arguments, so you don't need to remember the order of arguments in a function call,
  6. Attributes

    , adding metadata to classes,
  7. Three new string comparison functions (str_contains(), str_starts_with(), and str_ends_with()),

and many more things.

PHP 8.0 is available on your Gigahost account as of today.

Since PHP 8.0 is a major release it may break some web sites. So make sure to test your site when changing to the new version. On Gigahost, you can change the version for each domain name, and always revert to the earlier version in case something doesn't work out.

The PHP version can be changed in the Gigahost Control Center by selecting the domain name and then “PHP version”.