3v4l.org

run code in 300+ PHP versions simultaneously
<?php $your_array = array(array(1, 2, 'last'), array(3, 4, 'last')); $arr = array(); for($i = 0 ; $i< count($your_array) -1 ; $i++) { for($j = 0 ; $j< count($your_array[$i]) -1 ; $j++) { $arr[] = $your_array[$i][$j]; } } print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/rt3UR
function name:  (null)
number of ops:  25
compiled vars:  !0 = $your_array, !1 = $arr, !2 = $i, !3 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->17
    8     4    >   ASSIGN                                                   !3, 0
          5      > JMP                                                      ->11
   10     6    >   FETCH_DIM_R                                      ~9      !0, !2
          7        FETCH_DIM_R                                      ~10     ~9, !3
          8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  ~10
    8    10        PRE_INC                                                  !3
         11    >   FETCH_DIM_R                                      ~12     !0, !2
         12        COUNT                                            ~13     ~12
         13        SUB                                              ~14     ~13, 1
         14        IS_SMALLER                                               !3, ~14
         15      > JMPNZ                                                    ~15, ->6
    6    16    >   PRE_INC                                                  !2
         17    >   COUNT                                            ~17     !0
         18        SUB                                              ~18     ~17, 1
         19        IS_SMALLER                                               !2, ~18
         20      > JMPNZ                                                    ~19, ->4
   14    21    >   INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.28 ms | 1388 KiB | 15 Q