[doc-en] master: curl: fix the strerror, curl_version() and curl_exec() return values (#5995)

From: Date: Thu, 22 Oct 2026 07:47:04 +0000
Subject: [doc-en] master: curl: fix the strerror, curl_version() and curl_exec() return values (#5995)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23873@lists.php.net to get a copy of this message
Author: qodelicious (qodelicious) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-10-22T09:47:01+02:00 Commit: https://github.com/php/doc-en/commit/fd34024b25c6fd07abe850e8b880d1d0f8b442a4 Raw diff: https://github.com/php/doc-en/commit/fd34024b25c6fd07abe850e8b880d1d0f8b442a4.diff curl: fix the strerror, curl_version() and curl_exec() return values (#5995) Changed paths: M reference/curl/functions/curl-exec.xml M reference/curl/functions/curl-multi-strerror.xml M reference/curl/functions/curl-share-strerror.xml M reference/curl/functions/curl-strerror.xml M reference/curl/functions/curl-version.xml Diff: diff --git a/reference/curl/functions/curl-exec.xml b/reference/curl/functions/curl-exec.xml index c8d01d945f08..ce71fe3796f1 100644 --- a/reference/curl/functions/curl-exec.xml +++ b/reference/curl/functions/curl-exec.xml @@ -32,13 +32,21 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> On success, this function flushes the result directly to the <literal>stdout</literal> and returns &true;, &return.falseforfailure;. However, if the <constant>CURLOPT_RETURNTRANSFER</constant> option is <link linkend="function.curl-setopt">set</link>, it will return the result on success, &false; on failure. - </para> + </simpara> + <simpara> + If <constant>CURLOPT_FILE</constant> or + <constant>CURLOPT_WRITEFUNCTION</constant> is set, the result is written to + that file or passed to that callback instead, nothing is written to + <literal>stdout</literal>, and &true; is returned on success. + Whichever of these options and <constant>CURLOPT_RETURNTRANSFER</constant> + was set last decides where the result goes. + </simpara> &return.falseproblem; <note> <para> diff --git a/reference/curl/functions/curl-multi-strerror.xml b/reference/curl/functions/curl-multi-strerror.xml index 1fcb183ec790..802e6e03efb6 100644 --- a/reference/curl/functions/curl-multi-strerror.xml +++ b/reference/curl/functions/curl-multi-strerror.xml @@ -35,9 +35,10 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - Returns error string for valid error code, &null; otherwise. - </para> + <simpara> + Returns the error description. For an unknown error code this is + <literal>"Unknown error"</literal>. + </simpara> </refsect1> <refsect1 role="seealso"> diff --git a/reference/curl/functions/curl-share-strerror.xml b/reference/curl/functions/curl-share-strerror.xml index 40855f7e93ee..da9a772f8f13 100644 --- a/reference/curl/functions/curl-share-strerror.xml +++ b/reference/curl/functions/curl-share-strerror.xml @@ -33,9 +33,10 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - Returns error description or &null; for invalid error code. - </para> + <simpara> + Returns the error description. For an unknown error code this is + <literal>"CURLSHcode unknown"</literal>. + </simpara> </refsect1> <refsect1 role="seealso"> diff --git a/reference/curl/functions/curl-strerror.xml b/reference/curl/functions/curl-strerror.xml index 6cacec3ac0a3..40b274a7eeb1 100644 --- a/reference/curl/functions/curl-strerror.xml +++ b/reference/curl/functions/curl-strerror.xml @@ -34,9 +34,10 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - Returns error description or &null; for invalid error code. - </para> + <simpara> + Returns the error description. For an unknown error code this is + <literal>"Unknown error"</literal>. + </simpara> </refsect1> <refsect1 role="examples"> diff --git a/reference/curl/functions/curl-version.xml b/reference/curl/functions/curl-version.xml index 765c464873a6..21bb0ee8843a 100644 --- a/reference/curl/functions/curl-version.xml +++ b/reference/curl/functions/curl-version.xml @@ -45,7 +45,7 @@ </row> <row> <entry>ssl_version_number</entry> - <entry>OpenSSL 24 bit version number</entry> + <entry>Always <literal>0</literal>, libcurl does not set it anymore</entry> </row> <row> <entry>ssl_version</entry> @@ -61,7 +61,10 @@ </row> <row> <entry>age</entry> - <entry/> + <entry> + The age of the version info returned by libcurl. Newer libcurl + versions have a higher age + </entry> </row> <row> <entry>features</entry> @@ -78,6 +81,34 @@ are supported (&true;) or not (&false;) </entry> </row> + <row> + <entry>ares</entry> + <entry>c-ares version, as a string, or an empty string if cURL was built without c-ares</entry> + </row> + <row> + <entry>ares_num</entry> + <entry>c-ares version number, or <literal>0</literal> if cURL was built without c-ares</entry> + </row> + <row> + <entry>libidn</entry> + <entry>libidn2 version, as a string, or an empty string if cURL was built without libidn2</entry> + </row> + <row> + <entry>iconv_ver_num</entry> + <entry>iconv version number, or <literal>0</literal> if cURL was built without iconv</entry> + </row> + <row> + <entry>libssh_version</entry> + <entry>SSH library name and version, as a string, or an empty string if cURL was built without SSH support</entry> + </row> + <row> + <entry>brotli_ver_num</entry> + <entry>Brotli version number, or <literal>0</literal> if cURL was built without Brotli</entry> + </row> + <row> + <entry>brotli_version</entry> + <entry>Brotli version, as a string, or an empty string if cURL was built without Brotli</entry> + </row> </tbody> </tgroup> </informaltable> @@ -98,7 +129,7 @@ <row> <entry>8.4.0</entry> <entry> - <literal>features_list</literal> added. + <literal>feature_list</literal> added. </entry> </row> <row>

« previous php.doc.cvs (#23873) next »