3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var=[]; for ($k=1;$k<3;$k++) { $var[$k] = 'foo'; } $dbq = ''; //define variable first for ($j=1;$j<3;$j++) { $dbq .= "stuff $var[$j] "; //check syntax change } echo $dbq;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 11
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 11
Branch analysis from position: 19
Branch analysis from position: 11
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/kmlNX
function name:  (null)
number of ops:  21
compiled vars:  !0 = $var, !1 = $k, !2 = $dbq, !3 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->6
    5     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  'foo'
    4     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 3
          7      > JMPNZ                                                    ~8, ->3
    8     8    >   ASSIGN                                                   !2, ''
    9     9        ASSIGN                                                   !3, 1
         10      > JMP                                                      ->17
   10    11    >   ROPE_INIT                                     3  ~13     'stuff+'
         12        FETCH_DIM_R                                      ~11     !0, !3
         13        ROPE_ADD                                      1  ~13     ~13, ~11
         14        ROPE_END                                      2  ~12     ~13, '+'
         15        ASSIGN_OP                                     8          !2, ~12
    9    16        PRE_INC                                                  !3
         17    >   IS_SMALLER                                               !3, 3
         18      > JMPNZ                                                    ~17, ->11
   13    19    >   ECHO                                                     !2
   14    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.76 ms | 1007 KiB | 13 Q