Ayesh Karunaratne
ba0f9fb501
ext/curl: Add feature_info assoc array to curl_version() ( #13439 )
...
The `phpinfo()` section of the Curl extension lists individual features
supported by the particular ext-Curl + libcurl build. However, the
`curl_version()` function return values do not indicate the same level of
details.
`curl_version()` has a `protocols` key that returns an array of all protocols
supported by the build. But the `features` key is a bitmask of all the features.
Checking the availability of certain feature requires knowing the corresponding
`CURL_VERSION` constant, and checking the availability of the constant and a
bitmask check for it in the `features` value.
For example, to determine HTTP2 support, it requires evaluating:
```php
defined('CURL_VERSION_HTTP2') && (curl_version()['features'] & CURL_VERSION_HTTP2 === CURL_VERSION_HTTP2)
```
To make feature availability checks more intuitive, this adds a new
`feature_list` key to `curl_version()` output array.
With it, checking for individual features availability is easier, and does
not require inspecting the availability of the `CURL_VERSION` constant and
the `features` key.
```php
!empty(curl_version()['feature_list']['HTTP2']);
```
2024-02-21 00:46:22 +00:00
..
2023-02-24 14:32:23 +00:00
2021-06-11 13:57:47 +02:00
2023-04-13 13:19:52 +02:00
2024-01-10 18:16:52 +00:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2021-07-20 12:28:35 +02:00
2023-07-07 10:38:26 +02:00
2023-07-07 10:38:26 +02:00
2021-06-11 13:57:47 +02:00
2024-01-31 21:58:27 +01:00
2021-06-11 11:57:42 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 11:57:42 +02:00
2021-06-14 14:52:44 +02:00
2021-06-14 14:52:44 +02:00
2021-06-11 13:57:47 +02:00
2023-07-07 10:38:26 +02:00
2022-06-14 11:45:44 +02:00
2023-04-19 16:23:52 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2022-05-03 15:08:43 +02:00
2021-06-11 11:57:42 +02:00
2023-08-10 15:51:53 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 11:57:42 +02:00
2024-01-31 13:48:17 +00:00
2024-01-31 13:48:17 +00:00
2021-10-21 10:33:40 +02:00
2023-07-17 20:42:39 +02:00
2023-07-17 20:42:39 +02:00
2023-07-17 20:42:39 +02:00
2023-07-17 20:42:39 +02:00
2023-07-17 20:42:39 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-10-05 09:51:58 +01:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-08-31 17:09:34 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-07-20 09:46:18 +02:00
2021-07-20 09:46:18 +02:00
2021-06-11 13:57:47 +02:00
2022-04-22 18:09:06 +02:00
2021-06-11 13:57:47 +02:00
2024-01-17 11:11:21 +01:00
2021-06-14 15:34:24 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2024-01-31 13:48:17 +00:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2021-06-14 14:52:44 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2023-02-24 14:32:23 +00:00
2022-04-29 16:39:01 +01:00
2023-07-08 21:32:10 +02:00
2023-07-07 10:38:26 +02:00
2021-06-14 15:34:24 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 13:57:47 +02:00
2023-06-13 17:30:57 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-28 09:54:45 +02:00
2021-06-28 09:54:45 +02:00
2021-06-28 09:54:45 +02:00
2021-06-28 09:54:45 +02:00
2023-12-08 13:36:52 +01:00
2021-06-14 14:52:44 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 12:58:44 +02:00
2021-06-11 13:57:47 +02:00
2022-06-13 18:57:37 -04:00
2023-03-25 18:15:20 +01:00
2024-02-21 00:46:22 +00:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 11:57:42 +02:00
2021-06-11 13:57:47 +02:00
2021-06-11 12:58:44 +02:00
2024-02-07 16:13:08 +01:00
2023-07-07 10:38:26 +02:00