3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = new stdclass; $c->prop = 'property'; $array = [ 'first' => 'first', ]; echo $notExisting ?? $c->notExisting ?? $c->prop; echo "\n"; echo $array['nonExisting'] ?? $array['first']; echo "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q0g2O
function name:  (null)
number of ops:  21
compiled vars:  !0 = $c, !1 = $array, !2 = $notExisting
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'stdclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        ASSIGN_OBJ                                               !0, 'prop'
          4        OP_DATA                                                  'property'
    6     5        ASSIGN                                                   !1, <array>
   10     6        COALESCE                                         ~8      !2
          7        FETCH_OBJ_IS                                     ~9      !0, 'notExisting'
          8        COALESCE                                         ~10     ~9
          9        FETCH_OBJ_R                                      ~11     !0, 'prop'
         10        QM_ASSIGN                                        ~10     ~11
         11        QM_ASSIGN                                        ~8      ~10
         12        ECHO                                                     ~8
   11    13        ECHO                                                     '%0A'
   12    14        FETCH_DIM_IS                                     ~12     !1, 'nonExisting'
         15        COALESCE                                         ~13     ~12
         16        FETCH_DIM_R                                      ~14     !1, 'first'
         17        QM_ASSIGN                                        ~13     ~14
         18        ECHO                                                     ~13
   13    19        ECHO                                                     '%0A'
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.06 ms | 1398 KiB | 13 Q