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