3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o = (object)['aa' => []]; echo ($o?->aa[0] ?? throw new Exception('not found'))?->getName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/3IIKt
function name:  (null)
number of ops:  16
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    6     2        JMP_NULL                                         ~4      !0
          3        FETCH_OBJ_IS                                     ~3      !0, 'aa'
          4        FETCH_DIM_IS                                     ~4      ~3, 0
          5        COALESCE                                         ~5      ~4
          6        NEW                                              $6      'Exception'
          7        SEND_VAL_EX                                              'not+found'
          8        DO_FCALL                                      0          
          9      > THROW                                         1          $6
         10*       QM_ASSIGN                                        ~5      <true>
         11*       JMP_NULL                                         $8      ~5
         12*       INIT_METHOD_CALL                                         ~5, 'getName'
         13*       DO_FCALL                                      0  $8      
         14*       ECHO                                                     $8
         15*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.7 ms | 998 KiB | 13 Q