3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = ""; $str[] = "b"; var_dump($str); $str = "a"; $str[0] = "b"; var_dump($str); $str = "a"; $str[1] = "b"; var_dump($str);
based on S7Hv9
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/45n6Z
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, ''
   4     1        ASSIGN_DIM                                               !0
         2        OP_DATA                                                  'b'
   5     3        INIT_FCALL                                               'var_dump'
         4        SEND_VAR                                                 !0
         5        DO_ICALL                                                 
   7     6        ASSIGN                                                   !0, 'a'
   8     7        ASSIGN_DIM                                               !0, 0
         8        OP_DATA                                                  'b'
   9     9        INIT_FCALL                                               'var_dump'
        10        SEND_VAR                                                 !0
        11        DO_ICALL                                                 
  11    12        ASSIGN                                                   !0, 'a'
  12    13        ASSIGN_DIM                                               !0, 1
        14        OP_DATA                                                  'b'
  13    15        INIT_FCALL                                               'var_dump'
        16        SEND_VAR                                                 !0
        17        DO_ICALL                                                 
        18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0