3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement('<tag></tag>'); if($xml) { echo 'An empty SimpleXMLElement is truthy'; } else { echo 'An empty SimpleXMLElement is falsey'; } echo "\n"; $obj = new stdClass(); if($obj) { echo 'An empty stdClass is truthy'; } else { echo 'An empty stdClass is falsey'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
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: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
Branch analysis from position: 15
filename:       /in/odeO2
function name:  (null)
number of ops:  17
compiled vars:  !0 = $xml, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Ctag%3E%3C%2Ftag%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    3     4      > JMPZ                                                     !0, ->7
    4     5    >   ECHO                                                     'An+empty+SimpleXMLElement+is+truthy'
          6      > JMP                                                      ->8
    6     7    >   ECHO                                                     'An+empty+SimpleXMLElement+is+falsey'
    8     8    >   ECHO                                                     '%0A'
    9     9        NEW                                              $5      'stdClass'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
   10    12      > JMPZ                                                     !1, ->15
   11    13    >   ECHO                                                     'An+empty+stdClass+is+truthy'
         14      > JMP                                                      ->16
   13    15    >   ECHO                                                     'An+empty+stdClass+is+falsey'
   14    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.89 ms | 1394 KiB | 13 Q