3v4l.org

run code in 500+ PHP versions simultaneously
<?php $thing = null; echo "\n---\n"; if ( $thing->count ) { echo "YES, there is a count.\n"; } else { echo "NO count\n"; } echo "\n---\n"; if ( $thing instanceof StdClass && $thing->count ) { echo "YES, there is a count.\n"; } else { echo "NO count\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
Branch analysis from position: 12
filename:       /in/E4uk7
function name:  (null)
number of ops:  17
compiled vars:  !0 = $thing
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, null
    5     1        ECHO                                                         '%0A---%0A'
    6     2        FETCH_OBJ_R                                          ~2      !0, 'count'
          3      > JMPZ                                                         ~2, ->6
    7     4    >   ECHO                                                         'YES%2C+there+is+a+count.%0A'
    6     5      > JMP                                                          ->7
    9     6    >   ECHO                                                         'NO+count%0A'
   13     7    >   ECHO                                                         '%0A---%0A'
   14     8        INSTANCEOF                                           ~3      !0, 'StdClass'
          9      > JMPZ_EX                                              ~3      ~3, ->12
         10    >   FETCH_OBJ_R                                          ~4      !0, 'count'
         11        BOOL                                                 ~3      ~4
         12    > > JMPZ                                                         ~3, ->15
   15    13    >   ECHO                                                         'YES%2C+there+is+a+count.%0A'
   14    14      > JMP                                                          ->16
   17    15    >   ECHO                                                         'NO+count%0A'
   18    16    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.46 ms | 1450 KiB | 13 Q