PHP 8 is here!
PHP 8.0 has just been released today. The new version brings a slew of great new features, such as:
- Just-in-time compiler that speeds up code execution,
- Union types that allow you to define a type as a combination of other types (for instance a function that accepts
int
or float - The
match
expression, enabling a shorter way of writingswitch
-like statements, - The nullsafe operator, enabling null coalescing on metods,
- Named arguments, so you don't need to remember the order of arguments in a function call,
Attributes
, adding metadata to classes,- Three new string comparison functions (
str_contains()
,str_starts_with()
, andstr_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”.