3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sections = []; $id = 'bla'; $x = isset($sections[$id]) ? $sections[$id]->getEvents() : []; var_dump($x); $y = $sections[$id]->getEvents() ?? []; var_dump($y);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OFFLB
function name:  (null)
number of ops:  24
compiled vars:  !0 = $sections, !1 = $id, !2 = $x, !3 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 'bla'
    7     2        ISSET_ISEMPTY_DIM_OBJ                         0          !0, !1
          3      > JMPZ                                                     ~6, ->9
          4    >   FETCH_DIM_R                                      ~7      !0, !1
          5        INIT_METHOD_CALL                                         ~7, 'getEvents'
          6        DO_FCALL                                      0  $8      
          7        QM_ASSIGN                                        ~9      $8
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~9      <array>
         10    >   ASSIGN                                                   !2, ~9
    9    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   11    14        FETCH_DIM_R                                      ~12     !0, !1
         15        INIT_METHOD_CALL                                         ~12, 'getEvents'
         16        DO_FCALL                                      0  $13     
         17        COALESCE                                         ~14     $13
         18        QM_ASSIGN                                        ~14     <array>
         19        ASSIGN                                                   !3, ~14
   12    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.38 ms | 997 KiB | 14 Q