3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrs = array(); $arrs[] = array('something1', 2); $arrs[] = array('something3', 'something4'); $arrs[] = array(); $arrs[] = array('something1', 3.12); $list = array(); foreach($arrs as $key=>$arr) { if(is_array($arr)) { echo $key; echo ", "; $list = array_merge($list, $arr); } else{ echo $key; echo " not array"; } } print_r($list);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 26
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 26
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 23
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/GQknM
function name:  (null)
number of ops:  31
compiled vars:  !0 = $arrs, !1 = $list, !2 = $arr, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  <array>
    5     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
    6     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  <array>
    7     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  <array>
    9     9        ASSIGN                                                   !1, <array>
   11    10      > FE_RESET_R                                       $10     !0, ->26
         11    > > FE_FETCH_R                                       ~11     $10, !2, ->26
         12    >   ASSIGN                                                   !3, ~11
   12    13        TYPE_CHECK                                  128          !2
         14      > JMPZ                                                     ~13, ->23
   13    15    >   ECHO                                                     !3
         16        ECHO                                                     '%2C+'
   14    17        INIT_FCALL                                               'array_merge'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $14     
         21        ASSIGN                                                   !1, $14
         22      > JMP                                                      ->25
   17    23    >   ECHO                                                     !3
         24        ECHO                                                     '+not+array'
   11    25    > > JMP                                                      ->11
         26    >   FE_FREE                                                  $10
   22    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.1 ms | 1388 KiB | 17 Q