1--TEST--
2Test socket_addrinfo_lookup()
3--SKIPIF--
4<?php
5if (!extension_loaded('sockets')) {
6    die('SKIP The sockets extension is not loaded.');
7}
8--FILE--
9<?php
10try {
11    $addrinfo = socket_addrinfo_lookup('127.0.0.1', 2000, array(
12        'ai_family' => AF_INET,
13        'ai_socktype' => SOCK_DGRAM,
14        'invalid' => null,
15    ));
16    var_dump($addrinfo[0]);
17} catch (\ValueError $e) {
18    echo $e->getMessage(), \PHP_EOL;
19}
20?>
21--EXPECT--
22socket_addrinfo_lookup(): Argument #3 ($hints) must only contain array keys "ai_flags", "ai_socktype", "ai_protocol", or "ai_family"
23