3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $tmp = (array) $a; var_dump(empty($tmp)); var_dump(emtpy($a)); if ($a == null) { echo "null"; print_r($a); } else if (empty($a)){ echo "empty"; print_r($a); }else if (!isset($a)){ echo "set"; print_r($a); } var_dump(empty($tmp));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 36
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/fVH1t
function name:  (null)
number of ops:  41
compiled vars:  !0 = $a, !1 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        CAST                                          7  ~5      !0
          4        ASSIGN                                                   !1, ~5
    4     5        INIT_FCALL                                               'var_dump'
          6        ISSET_ISEMPTY_CV                                 ~7      !1
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL_BY_NAME                                       'emtpy'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $9      
         13        SEND_VAR                                                 $9
         14        DO_ICALL                                                 
    7    15        IS_EQUAL                                                 !0, null
         16      > JMPZ                                                     ~11, ->22
    8    17    >   ECHO                                                     'null'
    9    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > JMP                                                      ->36
   10    22    >   ISSET_ISEMPTY_CV                                         !0
         23      > JMPZ                                                     ~13, ->29
   11    24    >   ECHO                                                     'empty'
   12    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > JMP                                                      ->36
   13    29    >   ISSET_ISEMPTY_CV                                 ~15     !0
         30        BOOL_NOT                                         ~16     ~15
         31      > JMPZ                                                     ~16, ->36
   14    32    >   ECHO                                                     'set'
   15    33        INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                                 
   17    36    >   INIT_FCALL                                               'var_dump'
         37        ISSET_ISEMPTY_CV                                 ~18     !1
         38        SEND_VAL                                                 ~18
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.02 ms | 1392 KiB | 17 Q