3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link http://stackoverflow.com/a/29864193/367456 */ $buffer = <<<XML <?xml version="1.0"?><!DOCTYPE xml <!-- ==================================== xhtml-lat1.ent ==================================== --> <!-- Portions (C) International Organization for Standardization 1986 Permission to copy in any form is granted for use with conforming SGML systems and applications as defined in ISO 8879, provided this notice is included in all copies. --> <!-- Character entity set. Typical invocation: <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> %HTMLlat1; --> <!ENTITY nbsp "&#160;"> <!-- no-break space = non-breaking space, U+00A0 ISOnum --> ]><foo>&nbsp;</foo> XML; libxml_disable_entity_loader(false); $xml = simplexml_load_string($buffer); $xml->asXML('php://output'); $xml = simplexml_load_string($buffer, 'SimpleXMLElement', LIBXML_NOENT); $xml->asXML('php://output');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rg5XA
function name:  (null)
number of ops:  21
compiled vars:  !0 = $buffer, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%3C%21DOCTYPE+xml+%0A+%0A%3C%21--%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0Axhtml-lat1.ent%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A--%3E%0A%0A%0A%3C%21--+Portions+%28C%29+International+Organization+for+Standardization+1986%0A+++++Permission+to+copy+in+any+form+is+granted+for+use+with%0A+++++conforming+SGML+systems+and+applications+as+defined+in%0A+++++ISO+8879%2C+provided+this+notice+is+included+in+all+copies.%0A--%3E%0A%3C%21--+Character+entity+set.+Typical+invocation%3A%0A++++%3C%21ENTITY+%25+HTMLlat1+PUBLIC%0A+++++++%22-%2F%2FW3C%2F%2FENTITIES+Latin+1+for+XHTML%2F%2FEN%22%0A+++++++%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml-lat1.ent%22%3E%0A++++%25HTMLlat1%3B%0A--%3E%0A%0A++%3C%21ENTITY+nbsp+++%22%26%23160%3B%22%3E+%3C%21--+no-break+space+%3D+non-breaking+space%2C%0A++++++++++++++++++++++++++++++++++U%2B00A0+ISOnum+--%3E%0A++++++++++++++++++++++++++++++++++%5D%3E%3Cfoo%3E%26nbsp%3B%3C%2Ffoo%3E'
   33     1        INIT_FCALL                                               'libxml_disable_entity_loader'
          2        SEND_VAL                                                 <false>
          3        DO_FCALL_BY_NAME                                         
   35     4        INIT_FCALL                                               'simplexml_load_string'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
   36     8        INIT_METHOD_CALL                                         !1, 'asXML'
          9        SEND_VAL_EX                                              'php%3A%2F%2Foutput'
         10        DO_FCALL                                      0          
   38    11        INIT_FCALL                                               'simplexml_load_string'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 'SimpleXMLElement'
         14        SEND_VAL                                                 2
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !1, $7
   39    17        INIT_METHOD_CALL                                         !1, 'asXML'
         18        SEND_VAL_EX                                              'php%3A%2F%2Foutput'
         19        DO_FCALL                                      0          
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.53 ms | 1396 KiB | 17 Q