Special Types
PHP defines some special types.
mixed: any typevoid: no returned valuecallable: may be used as a callbackiterable: may be used withforeach(), including arraynever: never returnsobject: object of any classparent: any of the parent class of the current class, excluding itself: the current classstatic: the current called class
Other special types are the scalar types.
<?php
function trumpet(iterable $herd) : never {
foreach ($herd as $calf) {
echo $calf;
}
die();
}
?>