1--TEST--
2getmxrr() test
3--SKIPIF--
4<?php
5if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6if (getenv("SKIP_ONLINE_TESTS")) die("skip test requiring internet connection");
7if (substr(PHP_OS, 0, 3) == 'WIN') {
8    die('skip: no Windows support');
9}
10?>
11--FILE--
12<?php
13$domains = array(
14    'mx1.tests.php.net.',
15    'mx2.tests.php.net.',
16    'qa.php.net.',
17);
18foreach ($domains as $domain) {
19    $result = getmxrr($domain, $hosts, $weights);
20    echo "Result: " . ($result ? "true" : "false")
21       . ", hosts: " . count( $hosts )
22       . ", weights: " . count( $weights ) . "\n";
23}
24?>
25--EXPECT--
26Result: true, hosts: 1, weights: 1
27Result: true, hosts: 2, weights: 2
28Result: false, hosts: 0, weights: 0
29