3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.48 ms | 1397 KiB | 13 Q