The 'never' Type
22/34
Enumerations — Fetch Properties
Pure Intersection Types
Explicitly mark a function that it never returns:
<?php
function redirect(string $uri): *never* {
header('Location: ' . $uri);
exit();
}
Remarks:
•
Just like
void
, only as a return type
•
It is a
bottom
type