3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 1; $b = $a['c'] ?? 'b'; $b = $a->c ?? 'b'; $a = []; $b = $a->f ?? 'b'; $a = new stdclass(); $b = $a['f'] ?? 'b';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/piqCB
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 1
    4     1        FETCH_DIM_IS                                         ~3      !0, 'c'
          2        COALESCE                                             ~4      ~3
          3        QM_ASSIGN                                            ~4      'b'
          4        ASSIGN                                                       !1, ~4
    5     5        FETCH_OBJ_IS                                         ~6      !0, 'c'
          6        COALESCE                                             ~7      ~6
          7        QM_ASSIGN                                            ~7      'b'
          8        ASSIGN                                                       !1, ~7
    7     9        ASSIGN                                                       !0, <array>
    8    10        FETCH_OBJ_IS                                         ~10     !0, 'f'
         11        COALESCE                                             ~11     ~10
         12        QM_ASSIGN                                            ~11     'b'
         13        ASSIGN                                                       !1, ~11
   10    14        NEW                                                  $13     'stdclass'
         15        DO_FCALL                                          0          
         16        ASSIGN                                                       !0, $13
   11    17        FETCH_DIM_IS                                         ~16     !0, 'f'
         18        COALESCE                                             ~17     ~16
         19        QM_ASSIGN                                            ~17     'b'
         20        ASSIGN                                                       !1, ~17
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
142 ms | 1482 KiB | 13 Q