3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(null->user_id); // Raise the warning as expected var_dump(null->user_id ?? 0); // Without Warning
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LZ0RH
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_OBJ_R                                          ~0      null, 'user_id'
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
    4     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_OBJ_IS                                         ~2      null, 'user_id'
          6        COALESCE                                             ~3      ~2
          7        QM_ASSIGN                                            ~3      0
          8        SEND_VAL                                                     ~3
          9        DO_ICALL                                                     
         10      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.31 ms | 1865 KiB | 14 Q