3v4l.org

run code in 300+ PHP versions simultaneously
<?php $client = new SoapClient("http://www.scottnichol.com/samples/hellowsdl2.php?wsdl&debug=1",array( "trace"=>1, "exceptions"=>0) ); //$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>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8njMk
function name:  (null)
number of ops:  40
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                                              'http%3A%2F%2Fwww.scottnichol.com%2Fsamples%2Fhellowsdl2.php%3Fwsdl%26debug%3D1'
    3     2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
    2     4        ASSIGN                                                   !0, $4
   11     5        INIT_METHOD_CALL                                         !0, 'hello'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !1, $7
   13     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
   15    15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !3, $12
   17    19        ECHO                                                     '%3Cpre%3E%0A'
   18    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
   19    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
   21    34        CONCAT                                           ~20     '%3Cbr+%2F%3E%0A+xml%3A+', !2
         35        ECHO                                                     ~20
   22    36        CONCAT                                           ~21     '%3Cbr+%2F%3E%0A+JSON%3A+', !3
         37        ECHO                                                     ~21
   23    38        ECHO                                                     '%3C%2Fpre%3E'
   24    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.88 ms | 1396 KiB | 19 Q