3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( '' => 'foo', 'foo' => '', null, array(), 1, true, false, ); $k = 'no'; $v = 'exist'; echo "$k => $v\n"; var_dump(!empty($a[$k])); var_dump(isset($a[$k]) && $a[$k]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/fn2YM
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $k, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 'no'
          2        ASSIGN                                                   !2, 'exist'
   13     3        ROPE_INIT                                     4  ~7      !1
          4        ROPE_ADD                                      1  ~7      ~7, '+%3D%3E+'
          5        ROPE_ADD                                      2  ~7      ~7, !2
          6        ROPE_END                                      3  ~6      ~7, '%0A'
          7        ECHO                                                     ~6
   14     8        INIT_FCALL                                               'var_dump'
          9        ISSET_ISEMPTY_DIM_OBJ                         1  ~9      !0, !1
         10        BOOL_NOT                                         ~10     ~9
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                                 
   15    13        INIT_FCALL                                               'var_dump'
         14        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !0, !1
         15      > JMPZ_EX                                          ~12     ~12, ->18
         16    >   FETCH_DIM_R                                      ~13     !0, !1
         17        BOOL                                             ~12     ~13
         18    >   SEND_VAL                                                 ~12
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.67 ms | 1395 KiB | 15 Q