3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function test() { throw new SoapFault("code", "string"); } } $server = new \SoapServer(null, array("uri" => "http://localhost", "location" => "http://localhost")); $server->setClass("Test"); try{ $server->handle('<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>'); } catch (Exception $e) { die("Exception catched as expected"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/YfmgA
function name:  (null)
number of ops:  15
compiled vars:  !0 = $server, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'SoapServer'
          1        SEND_VAL_EX                                              null
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   12     5        INIT_METHOD_CALL                                         !0, 'setClass'
          6        SEND_VAL_EX                                              'Test'
          7        DO_FCALL                                      0          
   15     8        INIT_METHOD_CALL                                         !0, 'handle'
          9        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A++++%3CSOAP-ENV%3AEnvelope+xmlns%3ASOAP-ENV%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22+xmlns%3Ans1%3D%22http%3A%2F%2Flocalhost%22+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3ASOAP-ENC%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fencoding%2F%22+SOAP-ENV%3AencodingStyle%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fencoding%2F%22%3E%3CSOAP-ENV%3ABody%3E%3Cns1%3Atest%3E%3C%2Fns1%3Atest%3E%3C%2FSOAP-ENV%3ABody%3E%3C%2FSOAP-ENV%3AEnvelope%3E'
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->14
   17    12  E > > CATCH                                       last         'Exception'
   18    13    > > EXIT                                                     'Exception+catched+as+expected'
   19    14    > > RETURN                                                   1

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YfmgA
function name:  test
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'SoapFault'
          1        SEND_VAL_EX                                              'code'
          2        SEND_VAL_EX                                              'string'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $0
    8     5*     > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.36 ms | 1386 KiB | 13 Q