3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.39 ms | 1395 KiB | 15 Q