3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dom = [ [ 'style' => [ 'text-align' => '', ] ], [ 'style' => [ ] ] ]; $key = 0; if (isset($dom[$key]['style']['text-align'])) { $align = strtoupper($dom[$key]['style']['text-align'][0]); var_dump('should be called but raise an error'); } if (isset($dom[$key]['style']['text-align'][0])) { var_dump('should not be called'); } $key = 1; if (isset($dom[$key]['style']['text-align'][0])) { var_dump('should not be called because text-align key is not defined'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 25
Branch analysis from position: 17
filename:       /in/gVpPk
function name:  (null)
number of ops:  35
compiled vars:  !0 = $dom, !1 = $key, !2 = $align
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   14     1        ASSIGN                                                       !1, 0
   15     2        FETCH_DIM_IS                                         ~5      !0, !1
          3        FETCH_DIM_IS                                         ~6      ~5, 'style'
          4        ISSET_ISEMPTY_DIM_OBJ                             0          ~6, 'text-align'
          5      > JMPZ                                                         ~7, ->17
   16     6    >   INIT_FCALL                                                   'strtoupper'
          7        FETCH_DIM_R                                          ~8      !0, !1
          8        FETCH_DIM_R                                          ~9      ~8, 'style'
          9        FETCH_DIM_R                                          ~10     ~9, 'text-align'
         10        FETCH_DIM_R                                          ~11     ~10, 0
         11        SEND_VAL                                                     ~11
         12        DO_ICALL                                             $12     
         13        ASSIGN                                                       !2, $12
   17    14        INIT_FCALL                                                   'var_dump'
         15        SEND_VAL                                                     'should+be+called+but+raise+an+error'
         16        DO_ICALL                                                     
   19    17    >   FETCH_DIM_IS                                         ~15     !0, !1
         18        FETCH_DIM_IS                                         ~16     ~15, 'style'
         19        FETCH_DIM_IS                                         ~17     ~16, 'text-align'
         20        ISSET_ISEMPTY_DIM_OBJ                             0          ~17, 0
         21      > JMPZ                                                         ~18, ->25
   20    22    >   INIT_FCALL                                                   'var_dump'
         23        SEND_VAL                                                     'should+not+be+called'
         24        DO_ICALL                                                     
   23    25    >   ASSIGN                                                       !1, 1
   24    26        FETCH_DIM_IS                                         ~21     !0, !1
         27        FETCH_DIM_IS                                         ~22     ~21, 'style'
         28        FETCH_DIM_IS                                         ~23     ~22, 'text-align'
         29        ISSET_ISEMPTY_DIM_OBJ                             0          ~23, 0
         30      > JMPZ                                                         ~24, ->34
   25    31    >   INIT_FCALL                                                   'var_dump'
         32        SEND_VAL                                                     'should+not+be+called+because+text-align+key+is+not+defined'
         33        DO_ICALL                                                     
   26    34    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.07 ms | 3395 KiB | 15 Q