3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server = new SoapServer(null,array('uri'=>$NAMESPACE)); $server->setClass('MyClass'); $server->handle(); // a class that creates a soap client within the server class MyClass { public function Make($something) { $client = new SoapClient('http://somewhere.com/soap.wsdl'); return new SoapFault('Validation','bogus'); } } // -- another file -- an originating client try { $clientA = new soapClient('http://localhost/soap.php'); } catch (SoapFault $e) { echo $e->faultstring; // error occurs here. wrong error message => expected "bogus" }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9rBYF
function name:  (null)
number of ops:  20
compiled vars:  !0 = $server, !1 = $NAMESPACE, !2 = $clientA, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'SoapServer'
          1        SEND_VAL_EX                                              null
          2        INIT_ARRAY                                       ~5      !1, 'uri'
          3        SEND_VAL_EX                                              ~5
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
    4     6        INIT_METHOD_CALL                                         !0, 'setClass'
          7        SEND_VAL_EX                                              'MyClass'
          8        DO_FCALL                                      0          
    5     9        INIT_METHOD_CALL                                         !0, 'handle'
         10        DO_FCALL                                      0          
   17    11        NEW                                              $10     'soapClient'
         12        SEND_VAL_EX                                              'http%3A%2F%2Flocalhost%2Fsoap.php'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $10
         15      > JMP                                                      ->19
   18    16  E > > CATCH                                       last         'SoapFault'
   19    17    >   FETCH_OBJ_R                                      ~13     !3, 'faultstring'
         18        ECHO                                                     ~13
   20    19    > > RETURN                                                   1

Class MyClass:
Function make:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9rBYF
function name:  Make
number of ops:  11
compiled vars:  !0 = $something, !1 = $client
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        NEW                                              $2      'SoapClient'
          2        SEND_VAL_EX                                              'http%3A%2F%2Fsomewhere.com%2Fsoap.wsdl'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $2
   11     5        NEW                                              $5      'SoapFault'
          6        SEND_VAL_EX                                              'Validation'
          7        SEND_VAL_EX                                              'bogus'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   $5
   12    10*     > RETURN                                                   null

End of function make

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.63 ms | 1395 KiB | 13 Q