3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.08 ms | 1396 KiB | 17 Q