1--TEST--
2Bug #73594 (dns_get_record() does not populate $additional out parameter)
3--SKIPIF--
4<?php
5if (getenv("SKIP_ONLINE_TESTS")) die("skip test requiring internet connection");
6
7$out = array();
8$ret = 0;
9exec("dig -tmx php.net +noall +additional 2>/dev/null", $out, $ret);
10
11if ($ret != 0) die("skip dig command is not present or failed to run");
12
13// skip empty and header lines
14$out = preg_grep("/^(?!($|;))/", $out);
15
16if (empty($out)) die("skip local resolver does not return additional records");
17?>
18--FILE--
19<?php
20$auth = array();
21$additional = array();
22$res = dns_get_record('php.net', DNS_MX, $auth, $additional);
23// only check $additional if dns_get_record is successful
24var_dump(!empty($res) && empty($additional));
25?>
26--EXPECT--
27bool(false)
28