3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(); $x['a']['b'] = true; $x['a']['c'] = false; if (empty($x['a']['b']['d']['e'])) { print "empty"; } else { print "not empty"; } print "\n"; if (empty($x['a']['b'])) { print "empty"; } else { print "not empty"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
Branch analysis from position: 21
filename:       /in/MZ9IK
function name:  (null)
number of ops:  23
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_W                                      $2      !0, 'a'
          2        ASSIGN_DIM                                               $2, 'b'
          3        OP_DATA                                                  <true>
    4     4        FETCH_DIM_W                                      $4      !0, 'a'
          5        ASSIGN_DIM                                               $4, 'c'
          6        OP_DATA                                                  <false>
    5     7        FETCH_DIM_IS                                     ~6      !0, 'a'
          8        FETCH_DIM_IS                                     ~7      ~6, 'b'
          9        FETCH_DIM_IS                                     ~8      ~7, 'd'
         10        ISSET_ISEMPTY_DIM_OBJ                         1          ~8, 'e'
         11      > JMPZ                                                     ~9, ->14
    6    12    >   ECHO                                                     'empty'
         13      > JMP                                                      ->15
    8    14    >   ECHO                                                     'not+empty'
   10    15    >   ECHO                                                     '%0A'
   11    16        FETCH_DIM_IS                                     ~10     !0, 'a'
         17        ISSET_ISEMPTY_DIM_OBJ                         1          ~10, 'b'
         18      > JMPZ                                                     ~11, ->21
   12    19    >   ECHO                                                     'empty'
         20      > JMP                                                      ->22
   14    21    >   ECHO                                                     'not+empty'
   15    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.46 ms | 1394 KiB | 13 Q