3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regions = [ 'int' => 1, 'nl' => 2, 'be' => 4, 'us' => 8, 'as' => 16, 'za' => 32, ]; for ($i = 0; $i < 1 << count($regions); $i++) array_walk($regions, function ($x, $region) use (&$list, $i) { if ($i & $x == 0) return; if (isset($list[$region])) $list[$region] .= ",$i"; else $list[$region] = $i; }); var_dump($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
filename:       /in/8puvr
function name:  (null)
number of ops:  19
compiled vars:  !0 = $regions, !1 = $i, !2 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->11
   13     3    >   INIT_FCALL                                               'array_walk'
          4        SEND_REF                                                 !0
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8puvr%3A13%240'
          6        BIND_LEXICAL                                             ~5, !2
          7        BIND_LEXICAL                                             ~5, !1
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
   12    10        PRE_INC                                                  !1
         11    >   COUNT                                            ~8      !0
         12        SL                                               ~9      1, ~8
         13        IS_SMALLER                                               !1, ~9
         14      > JMPNZ                                                    ~10, ->3
   15    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F8puvr%3A13%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8puvr
function name:  {closure}
number of ops:  18
compiled vars:  !0 = $x, !1 = $region, !2 = $list, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
          4        IS_EQUAL                                         ~4      !0, 0
          5        BW_AND                                           ~5      !3, ~4
          6      > JMPZ                                                     ~5, ->8
          7    > > RETURN                                                   null
          8    >   ISSET_ISEMPTY_DIM_OBJ                         0          !2, !1
          9      > JMPZ                                                     ~6, ->15
         10    >   NOP                                                      
         11        FAST_CONCAT                                      ~8      '%2C', !3
         12        ASSIGN_DIM_OP                .=               8          !2, !1
         13        OP_DATA                                                  ~8
         14      > JMP                                                      ->17
         15    >   ASSIGN_DIM                                               !2, !1
         16        OP_DATA                                                  !3
         17    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8puvr%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.56 ms | 1400 KiB | 17 Q