3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tree = [ 10 => [], 11 => [ 4 => [], 5 => [], 6 => [] ] ]; $path = array(11,5,0); $inseration = array('A','B'); $current = &$tree; foreach($path as $key){ $current = &$current[$key]; } $current = $inseration; print_r($tree);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/4RQDT
function name:  (null)
number of ops:  15
compiled vars:  !0 = $tree, !1 = $path, !2 = $inseration, !3 = $current, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   13     3        ASSIGN_REF                                               !3, !0
   14     4      > FE_RESET_R                                       $9      !1, ->9
          5    > > FE_FETCH_R                                               $9, !4, ->9
   15     6    >   FETCH_DIM_W                                      $10     !3, !4
          7        ASSIGN_REF                                               !3, $10
   14     8      > JMP                                                      ->5
          9    >   FE_FREE                                                  $9
   17    10        ASSIGN                                                   !3, !2
   18    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.85 ms | 997 KiB | 14 Q