3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = '<!DOCTYPE sgml [ <!ELEMENT sgml ANY> <!ENTITY % std "standard SGML"> <!ENTITY % signature " &#x2014; &author;."> <!ENTITY % question "Why couldn&#x2019;t I publish my books directly in %std;?"> <!ENTITY % author "William Shakespeare"> ]> <sgml>&question;&signature;</sgml>'; $dom = new DOMDocument; $dom->loadXML($var); var_dump($dom->doctype->entities->length);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/28FT6
function name:  (null)
number of ops:  14
compiled vars:  !0 = $var, !1 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%21DOCTYPE+sgml+%5B%0A++%3C%21ELEMENT+sgml+ANY%3E%0A++%3C%21ENTITY+%25+std+++++++%22standard+SGML%22%3E%0A++%3C%21ENTITY+%25+signature+%22+%26%23x2014%3B+%26author%3B.%22%3E%0A++%3C%21ENTITY+%25+question++%22Why+couldn%26%23x2019%3Bt+I+publish+my+books+directly+in+%25std%3B%3F%22%3E%0A++%3C%21ENTITY+%25+author++++%22William+Shakespeare%22%3E%0A%5D%3E%0A%3Csgml%3E%26question%3B%26signature%3B%3C%2Fsgml%3E'
   12     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   13     4        INIT_METHOD_CALL                                         !1, 'loadXML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   15     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~7      !1, 'doctype'
          9        FETCH_OBJ_R                                      ~8      ~7, 'entities'
         10        FETCH_OBJ_R                                      ~9      ~8, 'length'
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.42 ms | 1394 KiB | 15 Q