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( 'mx1.tests.php.net', 'mx2.tests.php.net' );
14foreach ( $domains as $domain )
15{
16    if ( getmxrr( $domain, $hosts, $weights ) )
17    {
18        echo "Hosts: " . count( $hosts ) . ", weights: " . count( $weights ) . "\n";
19    }
20}
21?>
22--EXPECT--
23Hosts: 1, weights: 1
24Hosts: 2, weights: 2
25