3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruit = array('apples'=>2, 'oranges'=>5, 'pears'=>0); echo $fruit['oranges']; // echoes 5 $fruit = "new string"; echo $fruit['oranges']; // causes illegal string offset error
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dbEhh
function name:  (null)
number of ops:  7
compiled vars:  !0 = $fruit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        FETCH_DIM_R                                      ~2      !0, 'oranges'
          2        ECHO                                                     ~2
    6     3        ASSIGN                                                   !0, 'new+string'
    7     4        FETCH_DIM_R                                      ~4      !0, 'oranges'
          5        ECHO                                                     ~4
          6      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.8 ms | 1383 KiB | 13 Q