Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions reference/soap/soapserver/addfunction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@
To export several functions, pass an array of function names.
</para>
<para>
To export all the functions, pass a special constant <constant>SOAP_FUNCTIONS_ALL</constant>.
To export all the functions, pass an array of function names.
</para>
<para>
As of PHP 8.4.0, passing an <type>int</type> value (including
<constant>SOAP_FUNCTIONS_ALL</constant>) is deprecated.
Use <function>get_defined_functions</function> to retrieve all functions
and pass them as an array instead.
</para>
<note>
<para>
Expand All @@ -54,6 +60,29 @@
&return.void;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Passing an <type>int</type> to
<methodname>SoapServer::addFunction</methodname>,
including <constant>SOAP_FUNCTIONS_ALL</constant>, has been deprecated.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
Expand All @@ -78,7 +107,8 @@ function echoTwoStrings($inputString1, $inputString2)
}
$server->addFunction(array("echoString", "echoTwoStrings"));

$server->addFunction(SOAP_FUNCTIONS_ALL);
$functions = array_merge(...get_defined_functions());
$server->addFunction($functions);

?>
]]>
Expand Down