1--TEST-- 2Check for ares_getaddrinfo 3--SKIPIF-- 4<?php 5if (getenv("SKIP_ONLINE_TESTS")) { 6 die("skip test requiring internet connection\n"); 7} 8?> 9--FILE-- 10<?php 11uv_getaddrinfo(uv_default_loop(), function($status, $names) { 12 echo "status: " . $status . PHP_EOL; 13 if (is_array($names)) { 14 echo "OK" . PHP_EOL; 15 } else { 16 echo "FAILED: 2nd parameter does not array" . PHP_EOL; 17 } 18},"php.net", NULL, array( 19 "ai_family" => UV::AF_UNSPEC 20)); 21 22uv_getaddrinfo(uv_default_loop(), function($status, $names) { 23 echo "status: " . $status . PHP_EOL; 24 if (is_array($names)) { 25 echo "OK" . PHP_EOL; 26 } else { 27 echo "FAILED: 2nd parameter does not array" . PHP_EOL; 28 } 29},"php.net", NULL, array( 30 "ai_family" => UV::AF_UNSPEC 31)); 32 33uv_run(); 34--EXPECT-- 35status: 0 36OK 37status: 0 38OK 39