3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regions = [ 'int' => 1, 'nl' => 2, 'be' => 4, 'us' => 8, 'as' => 16, 'za' => 32, ]; foreach ($regions as $region => $x) for ($i = $x; end($regions) * 2 - $i > 0; ++$i%$x?:$i+=$x) if (isset($list[$region])) $list[$region] .= ",$i"; else $list[$region] = $i; var_dump($list);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 29
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 29
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
Branch analysis from position: 6
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
Branch analysis from position: 6
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/jW32P
function name:  (null)
number of ops:  34
compiled vars:  !0 = $regions, !1 = $x, !2 = $region, !3 = $i, !4 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1      > FE_RESET_R                                       $6      !0, ->29
          2    > > FE_FETCH_R                                       ~7      $6, !1, ->29
          3    >   ASSIGN                                                   !2, ~7
   13     4        ASSIGN                                                   !3, !1
          5      > JMP                                                      ->21
   14     6    >   ISSET_ISEMPTY_DIM_OBJ                         0          !4, !2
          7      > JMPZ                                                     ~10, ->13
   15     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~12     '%2C', !3
         10        ASSIGN_DIM_OP                .=               8          !4, !2
         11        OP_DATA                                                  ~12
         12      > JMP                                                      ->15
   17    13    >   ASSIGN_DIM                                               !4, !2
         14        OP_DATA                                                  !3
   13    15    >   PRE_INC                                          ~14     !3
         16        MOD                                              ~15     ~14, !1
         17        JMP_SET                                          ~16     ~15, ->20
         18        ASSIGN_OP                                     1  ~17     !3, !1
         19        QM_ASSIGN                                        ~16     ~17
         20        FREE                                                     ~16
         21    >   INIT_FCALL                                               'end'
         22        SEND_REF                                                 !0
         23        DO_ICALL                                         $18     
         24        MUL                                              ~19     $18, 2
         25        SUB                                              ~20     ~19, !3
         26        IS_SMALLER                                               0, ~20
         27      > JMPNZ                                                    ~21, ->6
   12    28    > > JMP                                                      ->2
         29    >   FE_FREE                                                  $6
   19    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !4
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.13 ms | 1392 KiB | 17 Q