[php-src] Issue #11142: CURLOPT_SSL_CTX_FUNCTION missing
| From: | sudofox | Date: | Thu, 27 Apr 2023 18:47:55 +0000 |
| Subject: | [php-src] Issue #11142: CURLOPT_SSL_CTX_FUNCTION missing | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244288@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11142
Author: sudofox
### Description
The following code:
```php
<?php
...
curl_setopt($ch, CURLOPT_SSL_CTX_FUNCTION, $someContextFunction);
...
```
Resulted in this output:
```
PHP Fatal error: Uncaught Error: Undefined constant "CURLOPT_SSL_CTX_FUNCTION" in [snip]
```
This constant is documented in https://curl.se/libcurl/c/CURLOPT_SSL_CTX_FUNCTION.html
While searching for existing issues, I found this: https://github.com/php/php-src/pull/2961 which
mentions that many other options (including CURLOPT_SSL_CTX_FUNCTION) are missing, though I
don't know how accurate that is today. I don't see that constant defined in the php source
as it stands today.
```
$ php --version
PHP 8.2.4 (cli) (built: Mar 30 2023 20:51:57) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies
```
### PHP Version
PHP 8.2.4
### Operating System
Manjaro (rolling)