1--TEST-- 2Test curl_getinfo() function with CURLINFO_* from curl >= 7.72.0 3--EXTENSIONS-- 4curl 5--SKIPIF-- 6<?php $curl_version = curl_version(); 7if ($curl_version['version_number'] < 0x074800) { 8 exit("skip: test works only with curl >= 7.72.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_setopt($ch, CURLOPT_POSTFIELDS, "data"); 23curl_exec($ch); 24var_dump(curl_getinfo($ch, CURLINFO_EFFECTIVE_METHOD)); 25curl_close($ch); 26?> 27--EXPECT-- 28string(4) "POST" 29