function val() { $args = func_get_args(); foreach($args as $val) { if( is_null($val) ) continue; return $val; } return null;}