3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $client = new SoapClient("https://www.scottnichol.com/samples/hellowsdl2.php?wsdl&debug=0",array( "trace"=>1, "exceptions"=>0) ); //libxml_clear_errors(); //libxml_use_internal_errors(true); //$req->firstname="Scott"; //$req->age="50"; //$req->gender="M"; //$parameters->person = $req; $obj = $client->hello(array('firstname'=>"Scott",'age'=>"50",'gender'=>"M")); //$xml = simplexml_load_string($client->__getLastResponse()); $xml = simplexml_load_string($client->__getLastRequest()); //$xml = new SimplexmlElement($client->__getLastResponse(), TRUE); $json= json_encode($xml); //$json= json_encode($client->__getLastResponse()); print "<pre>\n"; print "<br />\n Request : ".htmlspecialchars($client->__getLastRequest()); print "<br />\n Response: ".htmlspecialchars($client->__getLastResponse()); print "<br />\n xml: ".$xml; print "<br />\n JSON: ".$json; print "</pre>"; /*if (!$xml) { $errors = libxml_get_errors(); foreach ($errors as $error) { echo display_xml_error($error, $xml); } }*/ var_dump($xml); echo "<BR>"; var_dump ($json); ?>

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/5SMl1:2 Stack trace: #0 {main} thrown in /in/5SMl1 on line 2
Output for Array change keys
Fatal error: Uncaught Error: Class 'SoapClient' not found in /in/5SMl1:2 Stack trace: #0 {main} thrown in /in/5SMl1 on line 2
Output for Lexical anon
Fatal error: Class 'SoapClient' not found in /in/5SMl1 on line 2

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page