mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
a555cc0b3d
Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
30 lines
692 B
PHP
30 lines
692 B
PHP
--TEST--
|
|
Test curl_getinfo() function with CURLINFO_HTTP_VERSION parameter
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("curl")) print "skip";
|
|
$curl_version = curl_version();
|
|
if ($curl_version['version_number'] < 0x073200) {
|
|
exit("skip: test works only with curl >= 7.50.0");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
include 'server.inc';
|
|
|
|
$ch = curl_init();
|
|
var_dump(0 === curl_getinfo($ch, CURLINFO_HTTP_VERSION));
|
|
|
|
$host = curl_cli_server_start();
|
|
|
|
$url = "{$host}/get.inc?test=";
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_exec($ch);
|
|
var_dump(CURL_HTTP_VERSION_1_1 === curl_getinfo($ch, CURLINFO_HTTP_VERSION));
|
|
curl_close($ch);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|