3v4l.org

run code in 300+ PHP versions simultaneously
<?php $g_module_id_bar_1['id'] = 5; $i = 1; $variablename = 'g_module_id_bar_'.$i; $key = 'id'; echo $$variablename[$key];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qk5ZL
function name:  (null)
number of ops:  10
compiled vars:  !0 = $g_module_id_bar_1, !1 = $i, !2 = $variablename, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'id'
          1        OP_DATA                                                  5
    5     2        ASSIGN                                                   !1, 1
    7     3        CONCAT                                           ~6      'g_module_id_bar_', !1
          4        ASSIGN                                                   !2, ~6
    8     5        ASSIGN                                                   !3, 'id'
   10     6        FETCH_R                      local               ~9      !2
          7        FETCH_DIM_R                                      ~10     ~9, !3
          8        ECHO                                                     ~10
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.39 ms | 1397 KiB | 13 Q