3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "dumps null:\n"; var_dump( null['test'] ); echo "\nthrows exception:"; var_dump( []['test'] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/haGa9
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'dumps+null%3A%0A'
    5     1        INIT_FCALL                                               'var_dump'
    6     2        FETCH_DIM_R                                      ~0      null, 'test'
          3        SEND_VAL                                                 ~0
    5     4        DO_ICALL                                                 
    9     5        ECHO                                                     '%0Athrows+exception%3A'
   11     6        INIT_FCALL                                               'var_dump'
   12     7        FETCH_DIM_R                                      ~2      <array>, 'test'
          8        SEND_VAL                                                 ~2
   11     9        DO_ICALL                                                 
   13    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
272.32 ms | 1009 KiB | 14 Q