3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'one' => array('one' => 11, 'two' =>12), 'two' => array('one' => 21, 'two' => 22) ); $s = "one,two"; $res = $a; foreach(explode(",", $s) as $item){ $res = $res[$item]; } echo $res;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/LeUFW
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $s, !2 = $res, !3 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, 'one%2Ctwo'
    9     2        ASSIGN                                                   !2, !0
   10     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%2C'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7      > FE_RESET_R                                       $8      $7, ->12
          8    > > FE_FETCH_R                                               $8, !3, ->12
   11     9    >   FETCH_DIM_R                                      ~9      !2, !3
         10        ASSIGN                                                   !2, ~9
   10    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $8
   14    13        ECHO                                                     !2
   15    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.79 ms | 999 KiB | 14 Q