3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'blah' => 1, 'foo' => 2, ]; $key = 'foo'; $val = $arr[$key] ?? null; echo $val; var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kOi1h
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $key, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, 'foo'
    9     2        FETCH_DIM_IS                                     ~5      !0, !1
          3        COALESCE                                         ~6      ~5
          4        QM_ASSIGN                                        ~6      null
          5        ASSIGN                                                   !2, ~6
   11     6        ECHO                                                     !2
   14     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
202.34 ms | 1398 KiB | 15 Q