3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { } class B { public function test(A $a) { if (!$a instanceof A) { die("Fuck type hinting, i am ". (is_object($a) ? get_class($a) : gettype($a)). "! This is SOAP"); } } } class C { } class Test { public function test() { $b = new B(); $b->test(new C()); } } $server = new \SoapServer(null, array("uri" => "http://localhost", "location" => "http://localhost")); $server->setClass("Test"); $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>');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NXP11
function name:  (null)
number of ops:  12
compiled vars:  !0 = $server
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   NEW                                              $1      'SoapServer'
          1        SEND_VAL_EX                                              null
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   32     5        INIT_METHOD_CALL                                         !0, 'setClass'
          6        SEND_VAL_EX                                              'Test'
          7        DO_FCALL                                      0          
   34     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          
   35    11      > RETURN                                                   1

Class A: [no user functions]
Class B:
Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NXP11
function name:  test
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INSTANCEOF                                       ~1      !0, 'A'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->14
   13     4    >   TYPE_CHECK                                  256          !0
          5      > JMPZ                                                     ~3, ->9
          6    >   GET_CLASS                                        ~4      !0
          7        QM_ASSIGN                                        ~5      ~4
          8      > JMP                                                      ->11
          9    >   GET_TYPE                                         ~6      !0
         10        QM_ASSIGN                                        ~5      ~6
         11    >   CONCAT                                           ~7      'Fuck+type+hinting%2C+i+am+', ~5
         12        CONCAT                                           ~8      ~7, '%21+This+is+SOAP'
         13      > EXIT                                                     ~8
   15    14    > > RETURN                                                   null

End of function test

End of class B.

Class C: [no user functions]
Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NXP11
function name:  test
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'test'
          4        NEW                                              $4      'C'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
   28     8      > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.51 ms | 1390 KiB | 13 Q