(PHP 4 >= 4.0.2, PHP 5, PHP 7)
curl_version — ��ȡ cURL �汾��Ϣ
$age
= CURLVERSION_NOW
] ) : array���ع��� cURL �汾����Ϣ��
age
���ع������飬��������Ԫ�أ�
Indice | ֵ���� |
---|---|
version_number | cURL 24 λ�汾�� |
version | cURL �汾�ţ��ַ�����ʽ |
ssl_version_number | OpenSSL 24 λ�汾�� |
ssl_version | OpenSSL �汾�ţ��ַ�����ʽ |
libz_version | zlib �汾�ţ��ַ�����ʽ |
host | ���ڱ���cURL��������Ϣ |
age | |
features | һ��CURL_VERSION_XXX������λ���� |
protocols | ���飬���� cURL ֧�ֵ�Э������ |
Example #1 curl_version() ����
������������鵱ǰ cURL �汾ʹ��curl_version()���ص� 'features' λ��������Щ�����ǿ��õġ�
<?php
// ��ȡcURL�汾����
$version = curl_version();
// ��cURL����汾��ʹ��λ�������ijЩ����
$bitfields = Array(
'CURL_VERSION_IPV6',
'CURL_VERSION_KERBEROS4',
'CURL_VERSION_SSL',
'CURL_VERSION_LIBZ'
);
foreach($bitfields as $feature)
{
echo $feature . ($version['features'] & constant($feature) ? ' matches' : ' does not match');
echo PHP_EOL;
}
?>