Article with an overview of the changes: <a href="https://stitcher.io/blog/new-in-php-8" rel="nofollow">https://stitcher.io/blog/new-in-php-8</a><p>Some highlights are union types, a JIT compiler, named arguments, annotations, and match expressions.<p>The approach to named arguments is interesting. It's nice that you don't have to change the signature of existing functions, but the downside seems to be that you can't enforce the usage of named arguments on callers, as in other languages like Ruby and Python where keyword arguments need to be declared as such.<p><pre><code> function foo(string $a, string $b, ?string $c = null, ?string $d = null)
{ /* … */ }
foo(
b: 'value b',
a: 'value a',
d: 'value d',
);</code></pre>