[doc-en] master: Fix broken examples (#5710)

From: Date: Sat, 25 Jul 2026 17:28:04 +0000
Subject: [doc-en] master: Fix broken examples (#5710)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23506@lists.php.net to get a copy of this message
Author: Kamil Tekiela (kamil-tekiela) Committer: GitHub (web-flow) Pusher: kamil-tekiela Date: 2026-07-25T18:28:01+01:00 Commit: https://github.com/php/doc-en/commit/84534c795fc64cc1866ae267fec3574249ec5f74 Raw diff: https://github.com/php/doc-en/commit/84534c795fc64cc1866ae267fec3574249ec5f74.diff Fix broken examples (#5710) * Add missing new in SoapServer examples * snmp2_get_next => snmp2_getnext Changed paths: M reference/snmp/functions/snmp2-getnext.xml M reference/soap/soapclient/getlastrequestheaders.xml M reference/soap/soapclient/getlastresponse.xml M reference/soap/soapclient/getlastresponseheaders.xml M reference/soap/soapserver/getlastresponse.xml Diff: diff --git a/reference/snmp/functions/snmp2-getnext.xml b/reference/snmp/functions/snmp2-getnext.xml index e2d215ecc5e2..f212ba9beb08 100644 --- a/reference/snmp/functions/snmp2-getnext.xml +++ b/reference/snmp/functions/snmp2-getnext.xml @@ -17,7 +17,7 @@ <methodparam choice="opt"><type>int</type><parameter>retries</parameter><initializer>-1</initializer></methodparam> </methodsynopsis> <simpara> - The <function>snmp2_get_next</function> function is used to read the + The <function>snmp2_getnext</function> function is used to read the value of the <acronym>SNMP</acronym> object that follows the specified <parameter>object_id</parameter>. </simpara> @@ -81,11 +81,11 @@ <refsect1 role="examples"> &reftitle.examples; <example> - <title>Using <function>snmp2_get_next</function></title> + <title>Using <function>snmp2_getnext</function></title> <programlisting role="php"> <![CDATA[ <?php -$nameOfSecondInterface = snmp2_get_next('localhost', 'public', 'IF-MIB::ifName.1'); +$nameOfSecondInterface = snmp2_getnext('localhost', 'public', 'IF-MIB::ifName.1'); ?> ]]> </programlisting> diff --git a/reference/soap/soapclient/getlastrequestheaders.xml b/reference/soap/soapclient/getlastrequestheaders.xml index 18529c8c8503..f21c76fcdcd2 100644 --- a/reference/soap/soapclient/getlastrequestheaders.xml +++ b/reference/soap/soapclient/getlastrequestheaders.xml @@ -44,7 +44,7 @@ <programlisting role="php"> <![CDATA[ <?php -$client = SoapClient("some.wsdl", array('trace' => 1)); +$client = new SoapClient("some.wsdl", array('trace' => 1)); $result = $client->SomeFunction(); echo "REQUEST HEADERS:\n" . $client->__getLastRequestHeaders() . "\n"; ?> diff --git a/reference/soap/soapclient/getlastresponse.xml b/reference/soap/soapclient/getlastresponse.xml index 271822681bd9..dcf8742ca49c 100644 --- a/reference/soap/soapclient/getlastresponse.xml +++ b/reference/soap/soapclient/getlastresponse.xml @@ -43,7 +43,7 @@ <programlisting role="php"> <![CDATA[ <?php -$client = SoapClient("some.wsdl", array('trace' => 1)); +$client = new SoapClient("some.wsdl", array('trace' => 1)); $result = $client->SomeFunction(); echo "Response:\n" . $client->__getLastResponse() . "\n"; ?> diff --git a/reference/soap/soapclient/getlastresponseheaders.xml b/reference/soap/soapclient/getlastresponseheaders.xml index 682fa06fee10..068f3db8d45a 100644 --- a/reference/soap/soapclient/getlastresponseheaders.xml +++ b/reference/soap/soapclient/getlastresponseheaders.xml @@ -44,7 +44,7 @@ <programlisting role="php"> <![CDATA[ <?php -$client = SoapClient("some.wsdl", array('trace' => 1)); +$client = new SoapClient("some.wsdl", array('trace' => 1)); $result = $client->SomeFunction(); echo "RESPONSE HEADERS:\n" . $client->__getLastResponseHeaders() . "\n"; ?> diff --git a/reference/soap/soapserver/getlastresponse.xml b/reference/soap/soapserver/getlastresponse.xml index d9f05451af21..901df121d360 100644 --- a/reference/soap/soapserver/getlastresponse.xml +++ b/reference/soap/soapserver/getlastresponse.xml @@ -42,7 +42,7 @@ <programlisting role="php"> <![CDATA[ <?php -$server = SoapServer("some.wsdl", ["trace" => 1]); +$server = new SoapServer("some.wsdl", ["trace" => 1]); $server->handle(); echo "Response:\n" . $server->__getLastResponse() . "\n"; ?>

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