3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.01 ms | 1399 KiB | 15 Q