3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = Array ( 4 => 'bim', 5 => 'pow', 6 => 'foo' ); $two = Array ( 'n' => Array ( 0 => 1 ), 'm' => Array ( 0 => 1, 1 => 2 ), 'l' => Array ( 0 => 1, 1 => 4, 2 => 64 ) ); $result = array(); while((list($oneKey, $oneValue) = each($one)) && (list($twoKey, $twoValue) = each($two))) { $temp = array(); foreach($twoValue as $item) { $temp[] = $twoKey.'-'.$item; } $result[] = $oneValue.', '.join(' ', $temp); }; $result = join(', ', $result); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 46) Position 1 = 29, Position 2 = 37
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 4
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 29, Position 2 = 37
Branch analysis from position: 29
Branch analysis from position: 37
Branch analysis from position: 12
Branch analysis from position: 37
filename:       /in/9oS8I
function name:  (null)
number of ops:  47
compiled vars:  !0 = $one, !1 = $two, !2 = $result, !3 = $temp, !4 = $twoValue, !5 = $item, !6 = $twoKey, !7 = $oneValue, !8 = $oneKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   29     2        ASSIGN                                                   !2, <array>
   30     3      > JMP                                                      ->21
   33     4    >   ASSIGN                                                   !3, <array>
   34     5      > FE_RESET_R                                       $13     !4, ->12
          6    > > FE_FETCH_R                                               $13, !5, ->12
   36     7    >   CONCAT                                           ~15     !6, '-'
          8        CONCAT                                           ~16     ~15, !5
          9        ASSIGN_DIM                                               !3
         10        OP_DATA                                                  ~16
   34    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $13
   38    13        CONCAT                                           ~18     !7, '%2C+'
         14        INIT_FCALL                                               'join'
         15        SEND_VAL                                                 '++'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $19     
         18        CONCAT                                           ~20     ~18, $19
         19        ASSIGN_DIM                                               !2
         20        OP_DATA                                                  ~20
   30    21    >   INIT_FCALL_BY_NAME                                       'each'
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0  $21     
         24        FETCH_LIST_R                                     $22     $21, 0
         25        ASSIGN                                                   !8, $22
         26        FETCH_LIST_R                                     $24     $21, 1
         27        ASSIGN                                                   !7, $24
         28      > JMPZ_EX                                          ~26     $21, ->37
   31    29    >   INIT_FCALL_BY_NAME                                       'each'
         30        SEND_VAR_EX                                              !1
         31        DO_FCALL                                      0  $27     
         32        FETCH_LIST_R                                     $28     $27, 0
         33        ASSIGN                                                   !6, $28
         34        FETCH_LIST_R                                     $30     $27, 1
         35        ASSIGN                                                   !4, $30
         36        BOOL                                             ~26     $27
         37    > > JMPNZ                                                    ~26, ->4
   40    38    >   INIT_FCALL                                               'join'
         39        SEND_VAL                                                 '%2C+'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                         $32     
         42        ASSIGN                                                   !2, $32
   41    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !2
         45        DO_ICALL                                                 
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.19 ms | 1400 KiB | 17 Q