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 = []; while((list($oneKey, $oneValue) = each($one)) && (list($twoKey, $twoValue) = each($two))) { $temp = []; 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 = 20
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 28, Position 2 = 36
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 4
Branch analysis from position: 37
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 = 28, Position 2 = 36
Branch analysis from position: 28
Branch analysis from position: 36
Branch analysis from position: 12
Branch analysis from position: 36
filename:       /in/ptW9W
function name:  (null)
number of ops:  46
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                                                      ->20
   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                                           ~17     !7, '+'
         14        INIT_FCALL                                               'join'
         15        SEND_VAL                                                 '+'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $18     
         18        CONCAT                                           ~19     ~17, $18
         19        ASSIGN_OP                                     8          !2, ~19
   30    20    >   INIT_FCALL_BY_NAME                                       'each'
         21        SEND_VAR_EX                                              !0
         22        DO_FCALL                                      0  $21     
         23        FETCH_LIST_R                                     $22     $21, 0
         24        ASSIGN                                                   !8, $22
         25        FETCH_LIST_R                                     $24     $21, 1
         26        ASSIGN                                                   !7, $24
         27      > JMPZ_EX                                          ~26     $21, ->36
   31    28    >   INIT_FCALL_BY_NAME                                       'each'
         29        SEND_VAR_EX                                              !1
         30        DO_FCALL                                      0  $27     
         31        FETCH_LIST_R                                     $28     $27, 0
         32        ASSIGN                                                   !6, $28
         33        FETCH_LIST_R                                     $30     $27, 1
         34        ASSIGN                                                   !4, $30
         35        BOOL                                             ~26     $27
         36    > > JMPNZ                                                    ~26, ->4
   40    37    >   INIT_FCALL                                               'join'
         38        SEND_VAL                                                 '+'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                         $32     
         41        ASSIGN                                                   !2, $32
   41    42        INIT_FCALL                                               'var_dump'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.31 ms | 1400 KiB | 17 Q