This function seems to disable/enable automatic error reporting through SOAP. Use it to prevent user "on the other side" from seeing internal errors of your application.
Sometimes it is better to send no answer at all than to inform users that your application has e.g. parse errors.
// disable error reporting
// enable error reporting
Default state of soap error handler is ENABLED.
It seems that the best practice is to disable it in constructor of your SOAP request handling class and enable in destructor.
For some situations, you may want to create your own error handling function instead (see set_error_handler and set_exception_handler) and throw custom SoapFaults with info like: "We have technical difficulties at the moment. Sorry!".
use_soap_error_handler — Set whether to use the SOAP error handler
$handler= true ] )
This function sets whether or not to use the SOAP error handler in the SOAP server.
It will return the previous value. If set to
TRUE, details of errors
in a SoapServer application will be sent to the client
as a SOAP fault message.
FALSE, the standard PHP error handler is used.
The default is to use the standard PHP error handler.
TRUEto send error details to clients.
Returns the original value.