3v4l.org

run code in 300+ PHP versions simultaneously
<?php $colors = array( 'red', 'green' ); $color=array(); foreach($colors as $value) { $j=1; while($j <6) {$samp = $value; if($j>1) $samp = $value."($j)"; array_push($color,$samp); $j++; } } print_r($color);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
Branch analysis from position: 6
Branch analysis from position: 14
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/oLbS4
function name:  (null)
number of ops:  27
compiled vars:  !0 = $colors, !1 = $color, !2 = $value, !3 = $j, !4 = $samp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $7      !0, ->22
          3    > > FE_FETCH_R                                               $7, !2, ->22
    7     4    >   ASSIGN                                                   !3, 1
    8     5      > JMP                                                      ->19
    9     6    >   ASSIGN                                                   !4, !2
   10     7        IS_SMALLER                                               1, !3
          8      > JMPZ                                                     ~10, ->14
   11     9    >   ROPE_INIT                                     3  ~12     '%28'
         10        ROPE_ADD                                      1  ~12     ~12, !3
         11        ROPE_END                                      2  ~11     ~12, '%29'
         12        CONCAT                                           ~14     !2, ~11
         13        ASSIGN                                                   !4, ~14
   12    14    >   INIT_FCALL                                               'array_push'
         15        SEND_REF                                                 !1
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                                 
   13    18        PRE_INC                                                  !3
    8    19    >   IS_SMALLER                                               !3, 6
         20      > JMPNZ                                                    ~18, ->6
    5    21    > > JMP                                                      ->3
         22    >   FE_FREE                                                  $7
   17    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.65 ms | 1388 KiB | 17 Q