3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( 'abc' => 123, 'def' => 456, 'test' => array( 123 => 'hip', 'hop' => array( 'tip' => 'top', 'top' => null ) ) ); foreach ($test as $old => $arr) { if (is_array($arr)) { unset($test[$old]); foreach ($arr as $new => $v) { $test[$old.$new] = $v; } } } var_dump($test);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/l05jl
function name:  (null)
number of ops:  21
compiled vars:  !0 = $test, !1 = $arr, !2 = $old, !3 = $v, !4 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1      > FE_RESET_R                                       $6      !0, ->16
          2    > > FE_FETCH_R                                       ~7      $6, !1, ->16
          3    >   ASSIGN                                                   !2, ~7
   16     4        TYPE_CHECK                                  128          !1
          5      > JMPZ                                                     ~9, ->15
   17     6    >   UNSET_DIM                                                !0, !2
   18     7      > FE_RESET_R                                       $10     !1, ->14
          8    > > FE_FETCH_R                                       ~11     $10, !3, ->14
          9    >   ASSIGN                                                   !4, ~11
   19    10        CONCAT                                           ~13     !2, !4
         11        ASSIGN_DIM                                               !0, ~13
         12        OP_DATA                                                  !3
   18    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $10
   15    15    > > JMP                                                      ->2
         16    >   FE_FREE                                                  $6
   24    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.75 ms | 1395 KiB | 15 Q