3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Privet'; class myClass { function functionA($counter){ $counter++; } public function functionB(){ $counter = 0; for($i=0; $i<10; $i++){ $this->functionA($counter); } echo $counter; } }; $varible = new myClass(); $varible->functionB();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lNCV5
function name:  (null)
number of ops:  7
compiled vars:  !0 = $varible
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'Privet'
   17     1        NEW                                              $1      'myClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   18     4        INIT_METHOD_CALL                                         !0, 'functionB'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class myClass:
Function functiona:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lNCV5
function name:  functionA
number of ops:  3
compiled vars:  !0 = $counter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        PRE_INC                                                  !0
    6     2      > RETURN                                                   null

End of function functiona

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

End of function functionb

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.34 ms | 1399 KiB | 13 Q