3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = array(1, 3); $k = 0; $x = 1; echo "$x\n"; for ($i = 1; $i < 300; $i++) { $x += $n[$k]; if ($k == 0) $k = 1; else $k = 0; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
Branch analysis from position: 8
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
Branch analysis from position: 8
filename:       /in/A7JLA
function name:  (null)
number of ops:  19
compiled vars:  !0 = $n, !1 = $k, !2 = $x, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
    4     2        ASSIGN                                                   !2, 1
    5     3        NOP                                                      
          4        FAST_CONCAT                                      ~7      !2, '%0A'
          5        ECHO                                                     ~7
    6     6        ASSIGN                                                   !3, 1
          7      > JMP                                                      ->16
    7     8    >   FETCH_DIM_R                                      ~9      !0, !1
          9        ASSIGN_OP                                     1          !2, ~9
    8    10        IS_EQUAL                                                 !1, 0
         11      > JMPZ                                                     ~11, ->14
         12    >   ASSIGN                                                   !1, 1
         13      > JMP                                                      ->15
    9    14    >   ASSIGN                                                   !1, 0
    6    15    >   PRE_INC                                                  !3
         16    >   IS_SMALLER                                               !3, 300
         17      > JMPNZ                                                    ~15, ->8
   10    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.84 ms | 1394 KiB | 13 Q