3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'testing'; $testing = 'foo'; $array = ['bar' => 'testing']; echo ${$array['bar']} . PHP_EOL; echo $$array['bar'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YMNlg
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test, !1 = $testing, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'testing'
    4     1        ASSIGN                                                   !1, 'foo'
    5     2        ASSIGN                                                   !2, <array>
    6     3        FETCH_DIM_R                                      ~6      !2, 'bar'
          4        FETCH_R                      local               ~7      ~6
          5        CONCAT                                           ~8      ~7, '%0A'
          6        ECHO                                                     ~8
    7     7        FETCH_R                      local               ~9      !2
          8        FETCH_DIM_R                                      ~10     ~9, 'bar'
          9        ECHO                                                     ~10
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.8 ms | 1384 KiB | 13 Q