1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/sockets/tests/socket_addrinfo_lookup.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

20 lines
493 B
PHP

--TEST--
Test socket_addrinfo_lookup()
--EXTENSIONS--
sockets
--FILE--
<?php
try {
$addrinfo = socket_addrinfo_lookup('127.0.0.1', 2000, array(
'ai_family' => AF_INET,
'ai_socktype' => SOCK_DGRAM,
'invalid' => null,
));
var_dump($addrinfo[0]);
} catch (\ValueError $e) {
echo $e->getMessage(), \PHP_EOL;
}
?>
--EXPECT--
socket_addrinfo_lookup(): Argument #3 ($hints) must only contain array keys "ai_flags", "ai_socktype", "ai_protocol", or "ai_family"