PHP 8.1.0 RC 4 available for testing

SoapFault::__construct

(PHP 5, PHP 7, PHP 8)

SoapFault::__constructConstructor de SoapFault

DescripciĆ³n

SoapFault::__construct(
    string $faultcode,
    string $faultstring,
    string $faultactor = ?,
    string $detail = ?,
    string $faultname = ?,
    string $headerfault = ?
)

Esta funciĆ³n es un alias de: SoapFault::SoapFault()

add a note add a note

User Contributed Notes 1 note

up
2
csnaitsirch at web dot de
11 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