3v4l.org

run code in 300+ PHP versions simultaneously
<?php $client = new SoapClient("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); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PEiVH
function name:  (null)
number of ops:  47
compiled vars:  !0 = $client, !1 = $obj, !2 = $xml, !3 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'SoapClient'
          1        SEND_VAL_EX                                              'www.scottnichol.com%2Fsamples%2Fhellowsdl2.php%3Fwsdl%26debug%3D0'
    3     2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
    2     4        ASSIGN                                                   !0, $4
   13     5        INIT_METHOD_CALL                                         !0, 'hello'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !1, $7
   15     9        INIT_FCALL                                               'simplexml_load_string'
         10        INIT_METHOD_CALL                                         !0, '__getLastRequest'
         11        DO_FCALL                                      0  $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !2, $10
   17    15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !3, $12
   19    19        ECHO                                                     '%3Cpre%3E%0A'
   20    20        INIT_FCALL                                               'htmlspecialchars'
         21        INIT_METHOD_CALL                                         !0, '__getLastRequest'
         22        DO_FCALL                                      0  $14     
         23        SEND_VAR                                                 $14
         24        DO_ICALL                                         $15     
         25        CONCAT                                           ~16     '%3Cbr+%2F%3E%0A+Request+%3A+', $15
         26        ECHO                                                     ~16
   21    27        INIT_FCALL                                               'htmlspecialchars'
         28        INIT_METHOD_CALL                                         !0, '__getLastResponse'
         29        DO_FCALL                                      0  $17     
         30        SEND_VAR                                                 $17
         31        DO_ICALL                                         $18     
         32        CONCAT                                           ~19     '%3Cbr+%2F%3E%0A+Response%3A+', $18
         33        ECHO                                                     ~19
   23    34        CONCAT                                           ~20     '%3Cbr+%2F%3E%0A+xml%3A+', !2
         35        ECHO                                                     ~20
   24    36        CONCAT                                           ~21     '%3Cbr+%2F%3E%0A+JSON%3A+', !3
         37        ECHO                                                     ~21
   25    38        ECHO                                                     '%3C%2Fpre%3E'
   35    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                                 
   36    42        ECHO                                                     '%3CBR%3E'
   37    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !3
         45        DO_ICALL                                                 
   40    46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.49 ms | 1400 KiB | 21 Q