3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; if (@$array[elm]) { echo 'foo'; } if (@$array[$elm]) { echo 'foo'; } if (!empty($array[$elm])) { echo 'foo'; } if ($array[$elm] ?? false) { echo 'foo'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 16
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/tgXRG
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $elm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        BEGIN_SILENCE                                    ~3      
          2        FETCH_CONSTANT                                   ~4      'elm'
          3        FETCH_DIM_R                                      ~5      !0, ~4
          4        END_SILENCE                                              ~3
          5      > JMPZ                                                     ~5, ->7
    6     6    >   ECHO                                                     'foo'
    9     7    >   BEGIN_SILENCE                                    ~6      
          8        FETCH_DIM_R                                      ~7      !0, !1
          9        END_SILENCE                                              ~6
         10      > JMPZ                                                     ~7, ->12
   10    11    >   ECHO                                                     'foo'
   13    12    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~8      !0, !1
         13        BOOL_NOT                                         ~9      ~8
         14      > JMPZ                                                     ~9, ->16
   14    15    >   ECHO                                                     'foo'
   17    16    >   FETCH_DIM_IS                                     ~10     !0, !1
         17        COALESCE                                         ~11     ~10
         18        QM_ASSIGN                                        ~11     <false>
         19      > JMPZ                                                     ~11, ->21
   18    20    >   ECHO                                                     'foo'
   19    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.45 ms | 1394 KiB | 13 Q