I was testing return types with PHP 7.
I\'ve created a simple script to test return types of PHP 7:
There is no equivalent type for void in php, return NULL; may fits your requirement since it doesn't have any type like 0 or any other value. Note: actual void means no return.