3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.49 ms | 1396 KiB | 17 Q