Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 207

Check if PHP function returns null or nothing

$
0
0

I have this code

 $return = $ep->$method($params); if ($return === null) {  throw new Exception('Endpoint has no return value'); } return $return;

Is there any way to distinguish between a method that returns null and a method that does not return anything?


Viewing all articles
Browse latest Browse all 207


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>