3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($k=1;$k<3;$k++) { ${'var'.$k} = 'foo'; } $dbq = ''; //define variable first for ($j=1;$j<3;$j++) { //check capital j and covert it to small 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 = 2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 11
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 11
Branch analysis from position: 20
Branch analysis from position: 11
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/Q6arM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $k, !1 = $dbq, !2 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->6
    4     2    >   CONCAT                                           ~4      'var', !0
          3        FETCH_W                      local               $5      ~4
          4        ASSIGN                                                   $5, 'foo'
    3     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 3
          7      > JMPNZ                                                    ~8, ->2
    7     8    >   ASSIGN                                                   !1, ''
    9     9        ASSIGN                                                   !2, 1
         10      > JMP                                                      ->18
   11    11    >   ROPE_INIT                                     3  ~14     'stuff+'
         12        CONCAT                                           ~11     'var', !2
         13        FETCH_R                      local               ~12     ~11
         14        ROPE_ADD                                      1  ~14     ~14, ~12
         15        ROPE_END                                      2  ~13     ~14, '+'
         16        ASSIGN_OP                                     8          !1, ~13
    9    17        PRE_INC                                                  !2
         18    >   IS_SMALLER                                               !2, 3
         19      > JMPNZ                                                    ~18, ->11
   15    20    >   ECHO                                                     !1
   16    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
279.6 ms | 1007 KiB | 13 Q