3v4l.org

run code in 300+ PHP versions simultaneously
<?php $me = __FILE__; $xml = <<<ENDOFXML <!DOCTYPE root [ <!ENTITY foo SYSTEM "php://filter/convert.base64-encode/resource=$me"> ]> <foo>&foo;</foo> ENDOFXML; echo "libxml version: " . LIBXML_DOTTED_VERSION . "\n\n"; $s = simplexml_load_string($xml); var_dump($s); echo "\n"; var_dump(base64_decode($s));
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.14
libxml version: 2.9.4 object(SimpleXMLElement)#1 (1) { ["foo"]=> object(SimpleXMLElement)#2 (1) { ["foo"]=> object(SimpleXMLElement)#3 (0) { } } } string(0) ""

preferences:
61.74 ms | 407 KiB | 5 Q