Is there such a thing?
for eg
$var = -5; echo thefunction($var); // should be 0 $var = 5; echo thefunction($var); // should be 5
function thefunction($number){ if ($number < 0) return 0; return $number; }
that should do the trick