Dutch PHP Conference 2021 - Call for Papers

SoapFault::__construct

(PHP 5, PHP 7)

SoapFault::__constructConstructeur SoapFault

Description

public SoapFault::__construct ( array|string|null $code , string $string , string|null $actor = null , mixed $details = null , string|null $name = null , mixed $headerFault = null )

Cette fonction est un alias de : SoapFault::SoapFault()

add a note add a note

User Contributed Notes 1 note

up
3
csnaitsirch at web dot de
10 years ago
The first Parameter of the constructor, the faultcode, of SoapFault must be a string. Otherwise it will lead to an error.

<?php
throw new SoapFault(1, "Error message!"); // wrong
throw new SoapFault("1", "Error message!"); // right
?>
To Top