3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo['ten'] = 10; // $foo['ten'] is an array holding an integer at key "ten" echo $str = "{$foo['ten']}"; // works "10" echo $str = "$foo[ten]";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vG5R4
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'ten'
          1        OP_DATA                                                  10
    4     2        FETCH_DIM_R                                      ~3      !0, 'ten'
          3        CAST                                          6  ~4      ~3
          4        ASSIGN                                           ~5      !1, ~4
          5        ECHO                                                     ~5
    6     6        FETCH_DIM_R                                      ~6      !0, 'ten'
          7        CAST                                          6  ~7      ~6
          8        ASSIGN                                           ~8      !1, ~7
          9        ECHO                                                     ~8
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.83 ms | 1393 KiB | 13 Q