What does a PHP function return by default? February 3, 2023 by Tarik null null if(foo() === null) – Nope. You can try it out by doing: $x = foo(); var_dump($x);