3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { static $myVar = 0; ++$myVar; return $myVar; } for ($i=0; $i<10; ++$i) { echo test() . "\n"; }
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 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/mkMIh
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->7
   11     2    >   INIT_FCALL                                               'test'
          3        DO_FCALL                                      0  $2      
          4        CONCAT                                           ~3      $2, '%0A'
          5        ECHO                                                     ~3
   10     6        PRE_INC                                                  !0
          7    >   IS_SMALLER                                               !0, 10
          8      > JMPNZ                                                    ~5, ->2
   12     9    > > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.44 ms | 1401 KiB | 14 Q