Skip to content

Commit 6b783ae

Browse files
AyeshGirgias
authored andcommitted
[PHP 8.4] Curl: Add CURLOPT_DEBUGFUNCTION
Commit: php/php-src#15674 PHP.Watch: [PHP 8.4: Curl: New `CURLOPT_DEBUGFUNCTION` option](https://php.watch/versions/8.4/CURLOPT_DEBUGFUNCTION)
1 parent cb622f5 commit 6b783ae

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed

reference/curl/constants_curl_setopt.xml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,4 +4534,131 @@
45344534
</para>
45354535
</listitem>
45364536
</varlistentry>
4537+
<varlistentry xml:id="constant.curlopt-debugfunction">
4538+
<term>
4539+
<constant>CURLOPT_DEBUGFUNCTION</constant>
4540+
(<type>int</type>)
4541+
</term>
4542+
<listitem>
4543+
<para>
4544+
Available as of PHP 8.4.0.
4545+
This option requires <constant>CURLOPT_VERBOSE</constant> option enabled.
4546+
A <type>callable</type> to replace the standard cURL verbose output.
4547+
This callback gets called during various stages of the request with verbose debug information.
4548+
The callback should match the following signature:
4549+
<methodsynopsis>
4550+
<type>void</type><methodname><replaceable>callback</replaceable></methodname>
4551+
<methodparam><type>CurlHandle</type><parameter>curlHandle</parameter></methodparam>
4552+
<methodparam><type>int</type><parameter>type</parameter></methodparam>
4553+
<methodparam><type>string</type><parameter>data</parameter></methodparam>
4554+
</methodsynopsis>
4555+
<variablelist role="function_parameters">
4556+
<varlistentry>
4557+
<term><parameter>curlHandle</parameter></term>
4558+
<listitem>
4559+
<simpara>
4560+
The cURL handle.
4561+
</simpara>
4562+
</listitem>
4563+
</varlistentry>
4564+
<varlistentry>
4565+
<term><parameter>type</parameter></term>
4566+
<listitem>
4567+
<simpara>
4568+
One of the following constants indicating the type of the <parameter>data</parameter> value:
4569+
</simpara>
4570+
<variablelist xml:id="constant.curl-debugfunction.constants" role="constant_list">
4571+
<varlistentry xml:id="constant.curlinfo-text">
4572+
<term>
4573+
<constant>CURLINFO_TEXT</constant>
4574+
(<type>int</type>)
4575+
</term>
4576+
<listitem>
4577+
<simpara>
4578+
Informational text.
4579+
</simpara>
4580+
</listitem>
4581+
</varlistentry>
4582+
<varlistentry xml:id="constant.curlinfo-header-in">
4583+
<term>
4584+
<constant>CURLINFO_HEADER_IN</constant>
4585+
(<type>int</type>)
4586+
</term>
4587+
<listitem>
4588+
<simpara>
4589+
Header (or header-like) data received from the peer.
4590+
</simpara>
4591+
</listitem>
4592+
</varlistentry>
4593+
<varlistentry xml:id="constant.curlinfo-header-out-debug">
4594+
<term>
4595+
<constant linkend="constant.curlinfo-header-out-debug">CURLINFO_HEADER_OUT</constant>
4596+
(<type>int</type>)
4597+
</term>
4598+
<listitem>
4599+
<simpara>
4600+
Header (or header-like) data sent to the peer.
4601+
</simpara>
4602+
</listitem>
4603+
</varlistentry>
4604+
<varlistentry xml:id="constant.curlinfo-data-in">
4605+
<term>
4606+
<constant>CURLINFO_DATA_IN</constant>
4607+
(<type>int</type>)
4608+
</term>
4609+
<listitem>
4610+
<simpara>
4611+
Unprocessed protocol data received from the peer.
4612+
Even if the data is encoded or compressed, it is not provided decoded nor decompressed to this callback.
4613+
</simpara>
4614+
</listitem>
4615+
</varlistentry>
4616+
<varlistentry xml:id="constant.curlinfo-data-out">
4617+
<term>
4618+
<constant>CURLINFO_DATA_OUT</constant>
4619+
(<type>int</type>)
4620+
</term>
4621+
<listitem>
4622+
<simpara>
4623+
Protocol data sent to the peer.
4624+
</simpara>
4625+
</listitem>
4626+
</varlistentry>
4627+
<varlistentry xml:id="constant.curlinfo-ssl-data-in">
4628+
<term>
4629+
<constant>CURLINFO_SSL_DATA_IN</constant>
4630+
(<type>int</type>)
4631+
</term>
4632+
<listitem>
4633+
<simpara>
4634+
<acronym>SSL</acronym>/<acronym>TLS</acronym> (binary) data received from the peer.
4635+
</simpara>
4636+
</listitem>
4637+
</varlistentry>
4638+
<varlistentry xml:id="constant.curlinfo-ssl-data-out">
4639+
<term>
4640+
<constant>CURLINFO_SSL_DATA_OUT</constant>
4641+
(<type>int</type>)
4642+
</term>
4643+
<listitem>
4644+
<simpara>
4645+
<acronym>SSL</acronym>/<acronym>TLS</acronym> (binary) data sent to the peer.
4646+
</simpara>
4647+
</listitem>
4648+
</varlistentry>
4649+
</variablelist>
4650+
</listitem>
4651+
</varlistentry>
4652+
<varlistentry>
4653+
<term><parameter>data</parameter></term>
4654+
<listitem>
4655+
<simpara>
4656+
Verbose debug data of the type indicate by the <parameter>type</parameter> parameter.
4657+
</simpara>
4658+
</listitem>
4659+
</varlistentry>
4660+
</variablelist>
4661+
</para>
4662+
</listitem>
4663+
</varlistentry>
45374664
</variablelist>

0 commit comments

Comments
 (0)