-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add support for CURLINFO_CONN_ID in curl_getinfo() #18984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR looks good to me. I would have really liked it if there was a test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks reasonable. Agree that the multi test would be good.
Thanks for the contribution! For the record the NEWS updated in a8a3c81 |
Add support for CURLINFO_CONN_ID in curl_getinfo()
Summary
This patch adds support for the
CURLINFO_CONN_ID
constant in thecurl_getinfo()
function when compiled with libcurl >= 8.2.0.CURLINFO_CONN_ID
allows retrieving the unique identifier of the underlying connection used in the most recent transfer. This is useful for advanced features like connection reuse tracking, diagnostics, or connection pooling implementations at the PHP level.Details
curl_getinfo($ch, CURLINFO_CONN_ID)
when available."conn_id"
key to the associative array returned bycurl_getinfo($ch)
if applicable.SKIPIF
check ensures that the test is skipped if the libcurl version is too old..phpt
test file:ext/curl/tests/curl_getinfo_CURLINFO_CONN_ID.phpt
.Requirements
Example usage