3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $responseFaultDetailXML = <<<XML <detail> <pfresponse:FaultResponse> <FaultResponseString>$faultMessage</FaultResponseString> </pfresponse:FaultResponse> </detail> XML; $responseFaultDetail = new SimpleXMLElement($responseFaultDetailXML); $newSoapFault = new SoapFault($faultCode, $faultMessage, null, $responseFaultDetail); var_export($newSoapFault);
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: faultMessage in /in/LfAkG on line 6 Warning: SimpleXMLElement::__construct(): namespace error : Namespace prefix pfresponse on FaultResponse is not defined in /in/LfAkG on line 10 Warning: SimpleXMLElement::__construct(): <pfresponse:FaultResponse> in /in/LfAkG on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/LfAkG on line 10 Fatal error: Uncaught Error: Class 'SoapFault' not found in /in/LfAkG:12 Stack trace: #0 {main} thrown in /in/LfAkG on line 12
Process exited with code 255.
Output for 5.4.9 - 5.6.21
Notice: Undefined variable: faultMessage in /in/LfAkG on line 8 Warning: SimpleXMLElement::__construct(): namespace error : Namespace prefix pfresponse on FaultResponse is not defined in /in/LfAkG on line 10 Warning: SimpleXMLElement::__construct(): <pfresponse:FaultResponse> in /in/LfAkG on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/LfAkG on line 10 Fatal error: Class 'SoapFault' not found in /in/LfAkG on line 12
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Notice: Undefined variable: faultMessage in /in/LfAkG on line 8 Warning: SimpleXMLElement::__construct(): namespace error : Namespace prefix pfresponse on FaultResponse is not defined in /in/LfAkG on line 10 Warning: SimpleXMLElement::__construct(): <pfresponse:FaultResponse> in /in/LfAkG on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/LfAkG on line 10 Notice: Undefined variable: faultCode in /in/LfAkG on line 12 Notice: Undefined variable: faultMessage in /in/LfAkG on line 12 SoapFault::__set_state(array( 'message' => '', 'string' => '', 'code' => 0, 'file' => '/in/LfAkG', 'line' => 12, 'trace' => array ( ), 'previous' => NULL, 'faultstring' => '', 'detail' => SimpleXMLElement::__set_state(array( 'pfresponse:FaultResponse' => SimpleXMLElement::__set_state(array( 'FaultResponseString' => SimpleXMLElement::__set_state(array( )), )), )), ))