the A-record IPs for a host */ public function aRecords(string $host): array { $records = @dns_get_record($host, DNS_A); if (! is_array($records)) { return []; } return array_values(array_filter(array_map(fn ($r) => $r['ip'] ?? null, $records))); } }