Is there such a thing?
for eg
$var = -5; echo thefunction($var); // should be 0 $var = 5; echo thefunction($var); // should be 5
Not built-in but, here you have:
function thefunction($var){ return ($var < 0 ? 0 : $var); }
Hope this helps