3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'foo' => 'bar', 'example' => 'data', 'sn' => 'afu', ); $test = 'foo'; echo '$a["example"]= '; var_dump($a['example']); echo '$test= '; var_dump($test); echo '$a[$test]= '; var_dump($a[$test]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/87NBg
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 'foo'
   11     2        ECHO                                                     '%24a%5B%22example%22%5D%3D+'
   12     3        INIT_FCALL                                               'var_dump'
          4        FETCH_DIM_R                                      ~4      !0, 'example'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   14     7        ECHO                                                     '%24test%3D++++++++++'
   15     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   17    11        ECHO                                                     '%24a%5B%24test%5D%3D++++++'
   18    12        INIT_FCALL                                               'var_dump'
         13        FETCH_DIM_R                                      ~7      !0, !1
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.78 ms | 1394 KiB | 15 Q