3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE strony [ <!ENTITY shp SYSTEM "php://echo dir(\"/etc\");"> ] > <strony> <strona id="cccc"> <nazwa>bbbb</nazwa> <url>http://www.aaaa.pl/</url> <komentarz> &shp;</komentarz> </strona> </strony>'; $strony = new SimpleXMLElement($xml, LIBXML_NOENT); foreach($strony->strona->komentarz as $komentarz) echo "$komentarz\n";
Output for git.master, git.master_jit, rfc.property-hooks
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Invalid URI: php://echo dir(\ in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): <!ENTITY shp SYSTEM "php://echo dir(\"/etc\");"> in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): ^ in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Space required before 'NDATA' in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): <!ENTITY shp SYSTEM "php://echo dir(\"/etc\");"> in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): ^ in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : xmlParseEntityDecl: entity shp not terminated in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): <!ENTITY shp SYSTEM "php://echo dir(\"/etc\");"> in /in/gaFiQ on line 14 Warning: SimpleXMLElement::__construct(): ^ in /in/gaFiQ on line 14 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/gaFiQ:14 Stack trace: #0 /in/gaFiQ(14): SimpleXMLElement->__construct('<?xml version="...', 2) #1 {main} thrown in /in/gaFiQ on line 14
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
61.55 ms | 402 KiB | 8 Q