DNS_MX, 'A' => DNS_A, 'AAAA' => DNS_AAAA, 'NS' => DNS_NS, 'SOA' => DNS_SOA, ]; public function records(string $domain, string $type): ?array { $records = @dns_get_record($domain, self::TYPES[$type]); return $records === false ? null : array_values($records); } }