3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = null; $b = false; $c = $b ?: '1'; $d = $a ?? '2'; echo $c; echo $d;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u2JuL
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    3     1        ASSIGN                                                   !1, <false>
    4     2        JMP_SET                                          ~6      !1, ->4
          3        QM_ASSIGN                                        ~6      '1'
          4        ASSIGN                                                   !2, ~6
    5     5        COALESCE                                         ~8      !0
          6        QM_ASSIGN                                        ~8      '2'
          7        ASSIGN                                                   !3, ~8
    6     8        ECHO                                                     !2
    7     9        ECHO                                                     !3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.94 ms | 1397 KiB | 13 Q