3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public int|null $x = null; } $a = [new A()]; foreach ($a as $b) { var_dump($a['x']?->y ?? 0); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/0EpZj
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        ASSIGN                                                   !0, ~4
   10     4      > FE_RESET_R                                       $6      !0, ->15
          5    > > FE_FETCH_R                                               $6, !1, ->15
   11     6    >   INIT_FCALL                                               'var_dump'
          7        FETCH_DIM_IS                                     ~7      !0, 'x'
          8        JMP_NULL                                         ~8      ~7
          9        FETCH_OBJ_IS                                     ~8      ~7, 'y'
         10        COALESCE                                         ~9      ~8
         11        QM_ASSIGN                                        ~9      0
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                                 
   10    14      > JMP                                                      ->5
         15    >   FE_FREE                                                  $6
   12    16      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1309 KiB | 14 Q