1--TEST-- 2dns_get_record() error conditions 3--FILE-- 4<?php 5try { 6 // A random DNS Mode 7 dns_get_record('php.net', 15263480); 8} catch (\ValueError $exception) { 9 echo $exception->getMessage() . "\n"; 10} 11try { 12 // DNS Mode 0 13 $auth = []; 14 $additional = []; 15 dns_get_record('php.net', 0, $auth, $additional, true); 16} catch (\ValueError $exception) { 17 echo $exception->getMessage() . "\n"; 18} 19try { 20 // A random DNS Mode 21 $auth = []; 22 $additional = []; 23 dns_get_record('php.net', 15263480, $auth, $additional, true); 24} catch (\ValueError $exception) { 25 echo $exception->getMessage() . "\n"; 26} 27?> 28--EXPECT-- 29dns_get_record(): Argument #2 ($type) must be a DNS_* constant 30dns_get_record(): Argument #2 ($type) must be between 1 and 65535 when argument #5 ($raw) is true 31dns_get_record(): Argument #2 ($type) must be between 1 and 65535 when argument #5 ($raw) is true 32