3v4l.org

run code in 300+ PHP versions simultaneously
<?php $default = 'onions'; $topping = ''; echo $topping ?: $default; echo $topping && $default; $topping = 'mushrooms'; echo $topping ?: $default; echo $topping && $default;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/ZcMus
function name:  (null)
number of ops:  16
compiled vars:  !0 = $default, !1 = $topping
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'onions'
    3     1        ASSIGN                                                   !1, ''
    4     2        JMP_SET                                          ~4      !1, ->4
          3        QM_ASSIGN                                        ~4      !0
          4        ECHO                                                     ~4
    5     5      > JMPZ_EX                                          ~5      !1, ->7
          6    >   BOOL                                             ~5      !0
          7    >   ECHO                                                     ~5
    6     8        ASSIGN                                                   !1, 'mushrooms'
    7     9        JMP_SET                                          ~7      !1, ->11
         10        QM_ASSIGN                                        ~7      !0
         11        ECHO                                                     ~7
    8    12      > JMPZ_EX                                          ~8      !1, ->14
         13    >   BOOL                                             ~8      !0
         14    >   ECHO                                                     ~8
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.75 ms | 1384 KiB | 13 Q