mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-27 04:24:45 +01:00
32 lines
705 B
Plaintext
32 lines
705 B
Plaintext
|
--TEST--
|
||
|
Check for ares_gethostbyname
|
||
|
--FILE--
|
||
|
<?php
|
||
|
uv_getaddrinfo(uv_default_loop(),function($status,$names){
|
||
|
echo "status: " . $status . PHP_EOL;
|
||
|
if (is_array($names)) {
|
||
|
echo "OK" . PHP_EOL;
|
||
|
} else {
|
||
|
echo "FAILED: 2nd parameter does not array" . PHP_EOL;
|
||
|
}
|
||
|
},"php.net", NULL ,array(
|
||
|
"ai_family" => UV::AF_UNSPEC
|
||
|
));
|
||
|
|
||
|
uv_getaddrinfo(uv_default_loop(),function($status,$names){
|
||
|
echo "status: " . $status . PHP_EOL;
|
||
|
if (is_array($names)) {
|
||
|
echo "OK" . PHP_EOL;
|
||
|
} else {
|
||
|
echo "FAILED: 2nd parameter does not array" . PHP_EOL;
|
||
|
}
|
||
|
},"php.net", NULL ,array(
|
||
|
"ai_family" => UV::AF_UNSPEC
|
||
|
));
|
||
|
|
||
|
uv_run();
|
||
|
--EXPECT--
|
||
|
status: 0
|
||
|
OK
|
||
|
status: 0
|
||
|
OK
|