3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ['transparent', 'grey', 'transparent', 'grey']; $arr2 = ['grey', 'transparent', 'grey', 'transparent']; $i = 0; $bool = true; for($x = 0; $x<20; $x++){ if($bool){ echo 'color ' . $arr1[$i] . "\n"; }else{ echo 'color ' . $arr2[$i] . "\n"; } $i = ++$i % 4; if($i ==0) $bool = !$bool; if($i ==0) echo "\n"; // to make it easier to read }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 6
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 6
Branch analysis from position: 29
Branch analysis from position: 6
Branch analysis from position: 26
Branch analysis from position: 23
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
Branch analysis from position: 23
filename:       /in/XdcHB
function name:  (null)
number of ops:  30
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $i, !3 = $bool, !4 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, 0
    8     3        ASSIGN                                                   !3, <true>
    9     4        ASSIGN                                                   !4, 0
          5      > JMP                                                      ->27
   10     6    > > JMPZ                                                     !3, ->12
   11     7    >   FETCH_DIM_R                                      ~10     !0, !2
          8        CONCAT                                           ~11     'color+', ~10
          9        CONCAT                                           ~12     ~11, '%0A'
         10        ECHO                                                     ~12
         11      > JMP                                                      ->16
   13    12    >   FETCH_DIM_R                                      ~13     !1, !2
         13        CONCAT                                           ~14     'color+', ~13
         14        CONCAT                                           ~15     ~14, '%0A'
         15        ECHO                                                     ~15
   15    16    >   PRE_INC                                          ~16     !2
         17        MOD                                              ~17     ~16, 4
         18        ASSIGN                                                   !2, ~17
   16    19        IS_EQUAL                                                 !2, 0
         20      > JMPZ                                                     ~19, ->23
         21    >   BOOL_NOT                                         ~20     !3
         22        ASSIGN                                                   !3, ~20
   17    23    >   IS_EQUAL                                                 !2, 0
         24      > JMPZ                                                     ~22, ->26
         25    >   ECHO                                                     '%0A'
    9    26    >   PRE_INC                                                  !4
         27    >   IS_SMALLER                                               !4, 20
         28      > JMPNZ                                                    ~24, ->6
   18    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.69 ms | 1395 KiB | 13 Q