3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.88 ms | 1447 KiB | 13 Q