3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(-1); // $sample = [ // 'view' => [ // 'path'=> [ // '1', // ]] // ]; $sample = []; if(is_array($sample['view']['path'])){ echo 1; } if(is_array($sample['view']) && is_array($sample['view']['path'])){ echo 1; } //vs if(isset($sample['view']['path']) && is_array($sample['view']['path'])){ echo 1; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 25
Branch analysis from position: 18
Branch analysis from position: 16
Branch analysis from position: 9
filename:       /in/YLXf7
function name:  (null)
number of ops:  28
compiled vars:  !0 = $sample
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   12     3        ASSIGN                                                   !0, <array>
   14     4        FETCH_DIM_R                                      ~3      !0, 'view'
          5        FETCH_DIM_R                                      ~4      ~3, 'path'
          6        TYPE_CHECK                                  128          ~4
          7      > JMPZ                                                     ~5, ->9
   15     8    >   ECHO                                                     1
   18     9    >   FETCH_DIM_R                                      ~6      !0, 'view'
         10        TYPE_CHECK                                  128  ~7      ~6
         11      > JMPZ_EX                                          ~7      ~7, ->16
         12    >   FETCH_DIM_R                                      ~8      !0, 'view'
         13        FETCH_DIM_R                                      ~9      ~8, 'path'
         14        TYPE_CHECK                                  128  ~10     ~9
         15        BOOL                                             ~7      ~10
         16    > > JMPZ                                                     ~7, ->18
   19    17    >   ECHO                                                     1
   22    18    >   FETCH_DIM_IS                                     ~11     !0, 'view'
         19        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     ~11, 'path'
         20      > JMPZ_EX                                          ~12     ~12, ->25
         21    >   FETCH_DIM_R                                      ~13     !0, 'view'
         22        FETCH_DIM_R                                      ~14     ~13, 'path'
         23        TYPE_CHECK                                  128  ~15     ~14
         24        BOOL                                             ~12     ~15
         25    > > JMPZ                                                     ~12, ->27
   23    26    >   ECHO                                                     1
   24    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
122.44 ms | 1438 KiB | 14 Q