3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = null; if (empty($array['test'])) { echo 'empty test1<br />'; } $array = [ 'tests' => null, ]; if (empty($array['test'])) { echo 'empty test2<br />'; } $array = [ 'tests' => [], ]; if (empty($array['test'])) { echo 'empty test3<br />'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 8
Branch analysis from position: 4
filename:       /in/MW8q8
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    4     1        ISSET_ISEMPTY_DIM_OBJ                         1          !0, 'test'
          2      > JMPZ                                                     ~2, ->4
    5     3    >   ECHO                                                     'empty+test1%3Cbr+%2F%3E'
    8     4    >   ASSIGN                                                   !0, <array>
   11     5        ISSET_ISEMPTY_DIM_OBJ                         1          !0, 'test'
          6      > JMPZ                                                     ~4, ->8
   12     7    >   ECHO                                                     'empty+test2%3Cbr+%2F%3E'
   15     8    >   ASSIGN                                                   !0, <array>
   18     9        ISSET_ISEMPTY_DIM_OBJ                         1          !0, 'test'
         10      > JMPZ                                                     ~6, ->12
   19    11    >   ECHO                                                     'empty+test3%3Cbr+%2F%3E'
   20    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.79 ms | 1006 KiB | 13 Q