3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clientClass = 'DebugSoapClient'; $client = new $clientClass('http://www.webservicex.com/CurrencyConvertor.asmx?wsdl'); $client->sendRequest = false; $client->printRequest = true; $client->formatXML = true; $res = $client->ConversionRate( array('FromCurrency'=>'USD', 'ToCurrency'=>'EUR') ); var_dump($res); class DebugSoapClient extends SoapClient { public $sendRequest = true; public $printRequest = false; public $formatXML = false; public function __doRequest($request, $location, $action, $version, $one_way=0) { if ( $this->printRequest ) { if ( !$this->formatXML ) { $out = $request; } else { $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $doc->loadxml($request); $doc->formatOutput = true; $out = $doc->savexml(); } echo $out; } if ( $this->sendRequest ) { return parent::__doRequest($request, $location, $action, $version, $one_way); } else { return ''; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tspld
function name:  (null)
number of ops:  21
compiled vars:  !0 = $clientClass, !1 = $client, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'DebugSoapClient'
    4     1        FETCH_CLASS                                   0  $4      !0
          2        NEW                                              $5      $4
          3        SEND_VAL_EX                                              'http%3A%2F%2Fwww.webservicex.com%2FCurrencyConvertor.asmx%3Fwsdl'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
    5     6        ASSIGN_OBJ                                               !1, 'sendRequest'
          7        OP_DATA                                                  <false>
    6     8        ASSIGN_OBJ                                               !1, 'printRequest'
          9        OP_DATA                                                  <true>
    7    10        ASSIGN_OBJ                                               !1, 'formatXML'
         11        OP_DATA                                                  <true>
    9    12        INIT_METHOD_CALL                                         !1, 'ConversionRate'
         13        SEND_VAL_EX                                              <array>
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !2, $11
   10    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
   12    19        DECLARE_CLASS                                            'debugsoapclient', 'soapclient'
   39    20      > RETURN                                                   1

Class DebugSoapClient:
Function __dorequest:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 26
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 37
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 37
Branch analysis from position: 28
Branch analysis from position: 37
Branch analysis from position: 26
filename:       /in/tspld
function name:  __doRequest
number of ops:  39
compiled vars:  !0 = $request, !1 = $location, !2 = $action, !3 = $version, !4 = $one_way, !5 = $out, !6 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      0
   18     5        FETCH_OBJ_R                                      ~7      'printRequest'
          6      > JMPZ                                                     ~7, ->26
   19     7    >   FETCH_OBJ_R                                      ~8      'formatXML'
          8        BOOL_NOT                                         ~9      ~8
          9      > JMPZ                                                     ~9, ->12
   20    10    >   ASSIGN                                                   !5, !0
         11      > JMP                                                      ->25
   23    12    >   NEW                                              $11     'DOMDocument'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !6, $11
   24    15        ASSIGN_OBJ                                               !6, 'preserveWhiteSpace'
         16        OP_DATA                                                  <false>
   25    17        INIT_METHOD_CALL                                         !6, 'loadxml'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0          
   26    20        ASSIGN_OBJ                                               !6, 'formatOutput'
         21        OP_DATA                                                  <true>
   27    22        INIT_METHOD_CALL                                         !6, 'savexml'
         23        DO_FCALL                                      0  $17     
         24        ASSIGN                                                   !5, $17
   29    25    >   ECHO                                                     !5
   32    26    >   FETCH_OBJ_R                                      ~19     'sendRequest'
         27      > JMPZ                                                     ~19, ->37
   33    28    >   INIT_STATIC_METHOD_CALL                                  '__doRequest'
         29        SEND_VAR_EX                                              !0
         30        SEND_VAR_EX                                              !1
         31        SEND_VAR_EX                                              !2
         32        SEND_VAR_EX                                              !3
         33        SEND_VAR_EX                                              !4
         34        DO_FCALL                                      0  $20     
         35      > RETURN                                                   $20
         36*       JMP                                                      ->38
   36    37    > > RETURN                                                   ''
   38    38*     > RETURN                                                   null

End of function __dorequest

End of class DebugSoapClient.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.35 ms | 1400 KiB | 15 Q