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 ) ) ); $ref = &$test; 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 = 125) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/Ij0Qg
function name:  (null)
number of ops:  22
compiled vars:  !0 = $test, !1 = $ref, !2 = $arr, !3 = $old, !4 = $v, !5 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN_REF                                               !1, !0
   16     2      > FE_RESET_RW                                      $8      !0, ->17
          3    > > FE_FETCH_RW                                      ~9      $8, !2, ->17
          4    >   ASSIGN                                                   !3, ~9
   17     5        TYPE_CHECK                                  128          !2
          6      > JMPZ                                                     ~11, ->16
   18     7    >   UNSET_DIM                                                !0, !3
   19     8      > FE_RESET_R                                       $12     !2, ->15
          9    > > FE_FETCH_R                                       ~13     $12, !4, ->15
         10    >   ASSIGN                                                   !5, ~13
   20    11        CONCAT                                           ~15     !3, !5
         12        ASSIGN_DIM                                               !0, ~15
         13        OP_DATA                                                  !4
   19    14      > JMP                                                      ->9
         15    >   FE_FREE                                                  $12
   16    16    > > JMP                                                      ->3
         17    >   FE_FREE                                                  $8
   25    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.93 ms | 1395 KiB | 15 Q