Void¶
Void is a return type. It marks methods which do not return anything.
Indeed, void methods should not use the return statement, or, when they do, use it without any argument.
Void is only possible with methods, closures, functions and arrow functions. It makes no sense with properties or parameters.
<?php
function foo() : void {}
?>
See also Type Hinting No Return(Void)
Related : Null
Added in PHP 7.1