3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected function doStuff() { echo "yo"; } } class B extends A { public function doSomething() { for($i=0; $i<10; $i++) { $this->doStuff(); } } } $b = new B(); $b->doSomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sIYrg
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'doSomething'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function dostuff

End of class A.

Class B:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/sIYrg
function name:  doSomething
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->5
   12     2    >   INIT_METHOD_CALL                                         'doStuff'
          3        DO_FCALL                                      0          
   11     4        PRE_INC                                                  !0
          5    >   IS_SMALLER                                               !0, 10
          6      > JMPNZ                                                    ~4, ->2
   14     7    > > RETURN                                                   null

End of function dosomething

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

End of function dostuff

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.64 ms | 1395 KiB | 13 Q