3v4l.org

run code in 500+ PHP versions simultaneously
<?php $hash = null; var_dump($hash ?? 'test'); // output 'test' var_dump($hash ?: 'test'); // output 'test' $hash = ''; var_dump($hash ?? 'test'); // output '' var_dump($hash ?: 'test'); // output 'test'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ivv6k
function name:  (null)
number of ops:  23
compiled vars:  !0 = $hash
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, null
    4     1        INIT_FCALL                                                   'var_dump'
          2        COALESCE                                             ~2      !0
          3        QM_ASSIGN                                            ~2      'test'
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                                     
    5     6        INIT_FCALL                                                   'var_dump'
          7        JMP_SET                                              ~4      !0, ->9
          8        QM_ASSIGN                                            ~4      'test'
          9        SEND_VAL                                                     ~4
         10        DO_ICALL                                                     
    7    11        ASSIGN                                                       !0, ''
    8    12        INIT_FCALL                                                   'var_dump'
         13        COALESCE                                             ~7      !0
         14        QM_ASSIGN                                            ~7      'test'
         15        SEND_VAL                                                     ~7
         16        DO_ICALL                                                     
    9    17        INIT_FCALL                                                   'var_dump'
         18        JMP_SET                                              ~9      !0, ->20
         19        QM_ASSIGN                                            ~9      'test'
         20        SEND_VAL                                                     ~9
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.75 ms | 477 KiB | 8 Q