3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = '<?xml version="1.0"?> <!DOCTYPE lolz [ <!ENTITY lol "lol"> <!ENTITY lol2 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;"> <!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;"> <!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;"> <!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;"> <!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;"> <!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;"> <!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;"> <!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;"> ]> <lolz>&lol9;</lolz>'; $dom = new DOMDocument(); $dom->loadXML($xml);
based on EX2PL
Output for 5.0.0 - 7.2.0
Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 1 in /in/jHivh on line 16 Warning: DOMDocument::loadXML(): Detected an entity reference loop in Entity, line: 13 in /in/jHivh on line 16
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/jHivh on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/jHivh on line 15