xref: /PHP-7.4/ext/curl/tests/curl_basic_024.phpt (revision d6c05c6c)
1--TEST--
2Test curl_getinfo() function with CURLINFO_* from curl >= 7.52.0
3--SKIPIF--
4<?php if (!extension_loaded("curl")) print "skip";
5$curl_version = curl_version();
6if ($curl_version['version_number'] < 0x073400) {
7	    exit("skip: test works only with curl >= 7.52.0");
8}
9?>
10--FILE--
11<?php
12
13include 'server.inc';
14
15$ch = curl_init();
16$host = curl_cli_server_start();
17
18$url = "{$host}/get.inc?test=";
19curl_setopt($ch, CURLOPT_URL, $url);
20curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
21curl_exec($ch);
22var_dump(CURLPROTO_HTTP === curl_getinfo($ch, CURLINFO_PROTOCOL));
23var_dump(0 === curl_getinfo($ch, CURLINFO_PROXY_SSL_VERIFYRESULT));
24var_dump(curl_getinfo($ch, CURLINFO_SCHEME));
25curl_close($ch);
26?>
27===DONE===
28--EXPECT--
29bool(true)
30bool(true)
31string(4) "HTTP"
32===DONE===
33