Есть такая штука?
например,
$var = -5; echo thefunction($var); // should be 0 $var = 5; echo thefunction($var); // should be 5