function host_risk($host_name) { $host_id = get_hosts_id($host_name); If there is not a host with this name return false if (!$host_id) { return false; } $risk = return_last_risk_agent($host_id); return $risk; }