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(array_filter($regions, function($x) use ($i) { return $x & $number; }), function($x, $region) use (&$list) { isset($list[$region]) && $list[$region] .= ","; $list[$region] .= $x; } ); var_dump($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
Branch analysis from position: 3
filename:       /in/JcMak
function name:  (null)
number of ops:  24
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                                                      ->16
   13     3    >   INIT_FCALL                                               'array_walk'
          4        INIT_FCALL                                               'array_filter'
          5        SEND_VAR                                                 !0
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJcMak%3A13%240'
          7        BIND_LEXICAL                                             ~5, !1
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $6      
         10        SEND_VAR_NO_REF                               0          $6
   14    11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJcMak%3A14%241'
         12        BIND_LEXICAL                                             ~7, !2
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
   12    15        PRE_INC                                                  !1
         16    >   COUNT                                            ~10     !0
         17        SL                                               ~11     1, ~10
         18        IS_SMALLER                                               !1, ~11
         19      > JMPNZ                                                    ~12, ->3
   17    20    >   INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FJcMak%3A13%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JcMak
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $x, !1 = $i, !2 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BW_AND                                           ~3      !0, !2
          3      > RETURN                                                   ~3
          4*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2FJcMak%3A14%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/JcMak
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $x, !1 = $region, !2 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !2, !1
          4      > JMPZ_EX                                          ~3      ~3, ->8
          5    >   ASSIGN_DIM_OP                .=               8  ~4      !2, !1
          6        OP_DATA                                                  '%2C'
          7        BOOL                                             ~3      ~4
          8    >   ASSIGN_DIM_OP                .=               8          !2, !1
          9        OP_DATA                                                  !0
         10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FJcMak%3A14%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.18 ms | 1400 KiB | 19 Q