3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOF <child/> </person> </people> EOF; try{ $xmlO = new XMLReader(); $xmlO->xml($xml); if(!$xmlO->isValid()){ echo "no valid xml"; } /*$elem = new SimpleXMLElement($xml); foreach ($elem as $person) { printf("%s has got %d children.\n", $person['name'], $person->count()); } */ }catch(Exception $e){ echo "NO"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Found catch point at position: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p8Xce
function name:  (null)
number of ops:  16
compiled vars:  !0 = $xml, !1 = $xmlO, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0A++%3Cchild%2F%3E%0A+%3C%2Fperson%3E%0A%3C%2Fpeople%3E'
   10     1        NEW                                              $4      'XMLReader'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   11     4        INIT_METHOD_CALL                                         !1, 'xml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   12     7        INIT_METHOD_CALL                                         !1, 'isValid'
          8        DO_FCALL                                      0  $8      
          9        BOOL_NOT                                         ~9      $8
         10      > JMPZ                                                     ~9, ->12
   13    11    >   ECHO                                                     'no+valid+xml'
         12    > > JMP                                                      ->15
   21    13  E > > CATCH                                       last         'Exception'
   22    14    >   ECHO                                                     'NO'
   24    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.07 ms | 1393 KiB | 13 Q