3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $tmp = (array) $a; var_dump(empty($tmp)); var_dump(empty($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 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/oPHRU
function name:  (null)
number of ops:  39
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        ISSET_ISEMPTY_CV                                 ~9      !0
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                                 
    7    13        IS_EQUAL                                                 !0, null
         14      > JMPZ                                                     ~11, ->20
    8    15    >   ECHO                                                     'null'
    9    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > JMP                                                      ->34
   10    20    >   ISSET_ISEMPTY_CV                                         !0
         21      > JMPZ                                                     ~13, ->27
   11    22    >   ECHO                                                     'empty'
   12    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                                 
         26      > JMP                                                      ->34
   13    27    >   ISSET_ISEMPTY_CV                                 ~15     !0
         28        BOOL_NOT                                         ~16     ~15
         29      > JMPZ                                                     ~16, ->34
   14    30    >   ECHO                                                     'set'
   15    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                                 
   17    34    >   INIT_FCALL                                               'var_dump'
         35        ISSET_ISEMPTY_CV                                 ~18     !1
         36        SEND_VAL                                                 ~18
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.93 ms | 1400 KiB | 17 Q