3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.93 ms | 1394 KiB | 15 Q