1--TEST--
2Test curl_version() - feature_list functionality
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7    $info_curl = curl_version();
8    print_r(array_map(fn ($v) => get_debug_type($v), $info_curl['feature_list']));
9
10    ob_start();
11    phpinfo();
12    $phpinfo = ob_get_clean();
13
14    foreach ($info_curl['feature_list'] as $key => $value) {
15        if (!is_bool($value)) {
16            throw new Exception('Found non-bool value');
17        }
18
19        if (!str_contains($phpinfo, $key .' => ' . $value ? 'Yes' : 'No')) {
20            throw new Exception($key . ' not found in Curl phpinfo()');
21        }
22    }
23
24    echo "Complete";
25?>
26--EXPECTF--
27Array
28(
29    [AsynchDNS] => bool
30    [CharConv] => bool
31    [Debug] => bool
32    [GSS-Negotiate] => bool
33    [IDN] => bool
34    [IPv6] => bool
35    [krb4] => bool
36    [Largefile] => bool
37    [libz] => bool
38    [NTLM] => bool
39    [NTLMWB] => bool
40    [SPNEGO] => bool
41    [SSL] => bool
42    [SSPI] => bool
43    [TLS-SRP] => bool
44    [HTTP2] => bool
45    [GSSAPI] => bool
46    [KERBEROS5] => bool
47    [UNIX_SOCKETS] => bool
48    [PSL] => bool
49    [HTTPS_PROXY] => bool
50    [MULTI_SSL] => bool
51    [BROTLI] => bool
52%A)
53Complete
54