3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files=array("index.md","storage_index.md","storage_one.md"); $master_array=array(); foreach($files as $file) { $file=explode("_",$file); $cache=end($file); while($level=prev($file)) { $cache=array($level=>$cache); } $master_array=array_merge_recursive($master_array,$cache); } print_r($master_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 14
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 14
Branch analysis from position: 21
Branch analysis from position: 14
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/WvqCK
function name:  (null)
number of ops:  32
compiled vars:  !0 = $files, !1 = $master_array, !2 = $file, !3 = $cache, !4 = $level
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2      > FE_RESET_R                                       $7      !0, ->27
          3    > > FE_FETCH_R                                               $7, !2, ->27
    6     4    >   INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '_'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
    7     9        INIT_FCALL                                               'end'
         10        SEND_REF                                                 !2
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    8    13      > JMP                                                      ->16
   10    14    >   INIT_ARRAY                                       ~12     !3, !4
         15        ASSIGN                                                   !3, ~12
    8    16    >   INIT_FCALL                                               'prev'
         17        SEND_REF                                                 !2
         18        DO_ICALL                                         $14     
         19        ASSIGN                                           ~15     !4, $14
         20      > JMPNZ                                                    ~15, ->14
   12    21    >   INIT_FCALL                                               'array_merge_recursive'
         22        SEND_VAR                                                 !1
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $16     
         25        ASSIGN                                                   !1, $16
    4    26      > JMP                                                      ->3
         27    >   FE_FREE                                                  $7
   14    28        INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.83 ms | 1388 KiB | 23 Q