3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.28 ms | 1393 KiB | 13 Q