xref: /PHP-8.4/ext/curl/tests/curl_basic_024.phpt (revision 25c09939)
1--TEST--
2Test curl_getinfo() function with CURLINFO_* from curl >= 7.52.0
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7
8include 'server.inc';
9
10$ch = curl_init();
11$host = curl_cli_server_start();
12
13$url = "{$host}/get.inc?test=";
14curl_setopt($ch, CURLOPT_URL, $url);
15curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
16curl_exec($ch);
17var_dump(CURLPROTO_HTTP === curl_getinfo($ch, CURLINFO_PROTOCOL));
18var_dump(0 === curl_getinfo($ch, CURLINFO_PROXY_SSL_VERIFYRESULT));
19var_dump(curl_getinfo($ch, CURLINFO_SCHEME));
20curl_close($ch);
21?>
22--EXPECTF--
23bool(true)
24bool(true)
25string(4) "%r(HTTP|http)%r"
26