3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Create Security header $secns = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; $token = new stdClass; $token->Username = new SOAPVar('bugs_php_net_test', XSD_STRING, null, null, null, $secns); $token->Password = new SOAPVar('bugs_php_net_test', XSD_STRING, null, null, null, $secns); $wsec = new stdClass; $wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $secns); $headers = new SOAPHeader($secns, 'Security', $wsec, true); // Go go go $client = new SoapClient("http://www.webservicex.net/periodictable.asmx?WSDL", array('exceptions' => true, 'trace' => 1)); $client->__setSOAPHeaders($headers); $client->GetAtomicNumber(array('ElementName' => 'Vanadium'));
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SOAPVar' not found in /in/ZjmWA:5 Stack trace: #0 {main} thrown in /in/ZjmWA on line 5
Process exited with code 255.
Output for 5.4.1 - 5.6.28
Fatal error: Class 'SOAPVar' not found in /in/ZjmWA on line 5
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.webservicex.net/periodictable.asmx?WSDL' : failed to load external entity "http://www.webservicex.net/periodictable.asmx?WSDL" in /in/ZjmWA:12 Stack trace: #0 /in/ZjmWA(12): SoapClient->SoapClient('http://www.webs...', Array) #1 {main} thrown in /in/ZjmWA on line 12
Process exited with code 255.