Spaceship Operator, The Null Coalesce Operator and the Splat Operator


that’s it for the spaceship operator. Consider its use with usort

The null coalesce operator is used like this (e.g. check if a get var is set):

$id = $_GET[‚id‘] ?? 0;

This is much shorter than $id = isset($_GET[‚id‘]) ? $_GET[‚id‘] : 0;

Splat Operator for unpacking an array:

See also:

For more information and other new features in PHP 7 visit:

Splat Operator was introduced in php 5.6 as far as I remember.