1--TEST-- 2Test curl_getinfo() function with CURLINFO_* and CURLOPT_* from curl >= 7.84.0 3--EXTENSIONS-- 4curl 5--SKIPIF-- 6<?php $curl_version = curl_version(); 7if ($curl_version['version_number'] < 0x075400) { 8 exit("skip: test works only with curl >= 7.84.0"); 9} 10?> 11--FILE-- 12<?php 13include 'server.inc'; 14 15$ch = curl_init(); 16var_dump(array_key_exists('capath', curl_getinfo($ch))); 17var_dump(array_key_exists('cainfo', curl_getinfo($ch))); 18 19$host = curl_cli_server_start(); 20 21$url = "{$host}/get.inc?test="; 22curl_setopt($ch, CURLOPT_URL, $url); 23curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 24var_dump(curl_setopt($ch, CURLOPT_SSH_HOSTKEYFUNCTION, function ($ch, $keytype, $key, $keylen) { 25 // Can't really trigger this in a test 26 var_dump($keytype); 27 var_dump($key); 28 var_dump($keylen); 29 return CURLKHMATCH_OK; 30})); 31curl_exec($ch); 32curl_close($ch); 33?> 34--EXPECT-- 35bool(true) 36bool(true) 37bool(true) 38