3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mode = 0; echo "$mode\n"; for ($i = 0; $i <= 30; $i++) { $mode = ($mode + 1) % 5; echo $mode . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/nYgoD
function name:  (null)
number of ops:  15
compiled vars:  !0 = $mode, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        NOP                                                      
          2        FAST_CONCAT                                      ~3      !0, '%0A'
          3        ECHO                                                     ~3
    6     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->12
    7     6    >   ADD                                              ~5      !0, 1
          7        MOD                                              ~6      ~5, 5
          8        ASSIGN                                                   !0, ~6
    8     9        CONCAT                                           ~8      !0, '%0A'
         10        ECHO                                                     ~8
    6    11        PRE_INC                                                  !1
         12    >   IS_SMALLER_OR_EQUAL                                      !1, 30
         13      > JMPNZ                                                    ~10, ->6
    9    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.22 ms | 1393 KiB | 13 Q