1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/ext/curl/tests/bug72189.phpt
Javier Spagnoletti 6b73e692c9 Add more missing CURL_VERSION_* constants
And also check for CURL_VERSION_* constants in the sync-constants.php
script.

Related to request #72189: Add missing `CURL_VERSION_*` constants.
2019-05-02 15:11:42 +02:00

50 lines
839 B
PHP

--TEST--
Request #72189 (Add missing CURL_VERSION_* constants)
--SKIPIF--
<?php
include 'skipif.inc';
$version = curl_version();
if ($version['version_number'] < 0x071306) {
exit('skip: test works only with curl >= 7.19.6');
}
?>
--FILE--
<?php
$version = curl_version();
$bitfields = [
CURL_VERSION_ASYNCHDNS,
CURL_VERSION_CONV,
CURL_VERSION_CURLDEBUG,
CURL_VERSION_DEBUG,
CURL_VERSION_GSSNEGOTIATE,
CURL_VERSION_IDN,
CURL_VERSION_IPV6,
CURL_VERSION_KERBEROS4,
CURL_VERSION_LARGEFILE,
CURL_VERSION_LIBZ,
CURL_VERSION_NTLM,
CURL_VERSION_SPNEGO,
CURL_VERSION_SSL,
CURL_VERSION_SSPI,
];
$matchesCount = 0;
foreach ($bitfields as $feature) {
if ($version['features'] & $feature) {
++$matchesCount;
}
}
var_dump($matchesCount > 0);
?>
--EXPECT--
bool(true)