Nullable types finally have syntax

PHP 7.0 gave return types and no way to say a method might legitimately return nothing, so anything that could miss simply went untyped. 7.1 adds a leading question mark, and the two states become expressible rather than one being absent.

public function find(int $id): ?Product
{
    return $this->rows[$id] ?? null;
}

public function reindex(?DateTimeInterface $since = null): void
{
    // null is explicitly allowed; anything else must be a DateTimeInterface
}

A nullable parameter with a default of null was already implicitly nullable in 5.x, which is why so much old code has DateTime $since = null and works — the difference now is that it is stated rather than inferred. Note that ?Product and a union of two real types are not the same thing; there are no union types, so a method returning either a Product or an Error still has no signature.