mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
23 lines
412 B
PHP
23 lines
412 B
PHP
--TEST--
|
|
getmxrr() test
|
|
--SKIPIF--
|
|
<?php
|
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|
die('skip: no Windows support');
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$domains = array( 'php.net', 'ez.no' );
|
|
foreach ( $domains as $domain )
|
|
{
|
|
if ( getmxrr( $domain, $hosts, $weights ) )
|
|
{
|
|
echo "Hosts: " . count( $hosts ) . ", weights: " . count( $weights ) . "\n";
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Hosts: 2, weights: 2
|
|
Hosts: 1, weights: 1
|