3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $test = 5; public function getTest(){ return $this->test; } } class B { public function test(A $a) { die(($a instanceof A) ? var_export($a)."\n"."output: {$a->getTest()}" : "Fuck php, i am ".gettype($a)); } } class Test { public function test() { $b = new B(); $b->test(new A()); } } $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) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
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 = 62) Position 1 = -2
filename:       /in/3Dkmb
function name:  (null)
number of ops:  17
compiled vars:  !0 = $server, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $2      'SoapServer'
          1        SEND_VAL_EX                                              null
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   29     5        INIT_METHOD_CALL                                         !0, 'setClass'
          6        SEND_VAL_EX                                              'Test'
          7        DO_FCALL                                      0          
   32     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                                                      ->16
   34    12  E > > CATCH                                       last         'Exception'
   35    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   36    16    > > RETURN                                                   1

Class A:
Function gettest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Dkmb
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function gettest

End of class A.

Class B:
Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/3Dkmb
function name:  test
number of ops:  19
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        INSTANCEOF                                               !0, 'A'
          2      > JMPZ                                                     ~1, ->14
          3    >   INIT_FCALL                                               'var_export'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        NOP                                                      
          8        INIT_METHOD_CALL                                         !0, 'getTest'
          9        DO_FCALL                                      0  $4      
         10        FAST_CONCAT                                      ~5      'output%3A+', $4
         11        CONCAT                                           ~6      ~3, ~5
         12        QM_ASSIGN                                        ~7      ~6
         13      > JMP                                                      ->17
         14    >   GET_TYPE                                         ~8      !0
         15        CONCAT                                           ~9      'Fuck+php%2C+i+am+', ~8
         16        QM_ASSIGN                                        ~7      ~9
         17    > > EXIT                                                     ~7
   16    18*     > RETURN                                                   null

End of function test

End of class B.

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

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.12 ms | 1400 KiB | 17 Q