3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected function test() {} } class B extends A { public function test2($x) { $x->test(); } } class C extends A { protected function test() {} } class D extends C { protected function test() { echo "Hello World!\n"; } } (new B)->test2(new D);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5dkN
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'B'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'test2'
          3        NEW                                              $2      'D'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function test

End of class A.

Class B:
Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5dkN
function name:  test2
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_METHOD_CALL                                         !0, 'test'
          2        DO_FCALL                                      0          
    8     3      > RETURN                                                   null

End of function test2

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

End of function test

End of class B.

Class C:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5dkN
function name:  test
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   null

End of function test

End of class C.

Class D:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5dkN
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Hello+World%21%0A'
   16     1      > RETURN                                                   null

End of function test

End of class D.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
204.6 ms | 1395 KiB | 13 Q