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"; libxml_disable_entity_loader(); $s = simplexml_load_string($xml, null, LIBXML_NOENT); var_dump($s); echo "\n"; var_dump(base64_decode($s));
Output for 8.0.0 - 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 Deprecated: Function libxml_disable_entity_loader() is deprecated in /in/Pso2C on line 12 Warning: simplexml_load_string(): I/O warning : failed to load external entity "php://filter/convert.base64-encode/resource=/in/Pso2C" in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Failure to process entity foo in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Entity 'foo' not defined in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 bool(false) string(0) ""
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
libxml version: 2.9.4 Warning: simplexml_load_string(): I/O warning : failed to load external entity "php://filter/convert.base64-encode/resource=/in/Pso2C" in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Failure to process entity foo in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Entity 'foo' not defined in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 bool(false) string(0) ""
Output for 5.3.25 - 5.3.29
libxml version: 2.9.1 Warning: simplexml_load_string(): I/O warning : failed to load external entity "php://filter/convert.base64-encode/resource=/in/Pso2C" in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Failure to process entity foo in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Entity 'foo' not defined in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 bool(false) string(0) ""
Output for 5.3.15 - 5.3.24
libxml version: 2.8.0 Warning: simplexml_load_string(): I/O warning : failed to load external entity "php://filter/convert.base64-encode/resource=/in/Pso2C" in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Failure to process entity foo in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Entity 'foo' not defined in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 bool(false) string(0) ""
Output for 5.2.11 - 5.2.17, 5.3.0 - 5.3.14
libxml version: 2.7.8 Warning: simplexml_load_string(): I/O warning : failed to load external entity "php://filter/convert.base64-encode/resource=/in/Pso2C" in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Failure to process entity foo in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 Warning: simplexml_load_string(): Entity: line 5: parser error : Entity 'foo' not defined in /in/Pso2C on line 13 Warning: simplexml_load_string(): <foo>&foo;</foo> in /in/Pso2C on line 13 Warning: simplexml_load_string(): ^ in /in/Pso2C on line 13 bool(false) string(0) ""
Output for 5.1.0 - 5.1.1, 5.1.3 - 5.1.6, 5.2.0 - 5.2.10
libxml version: 2.7.8 Fatal error: Call to undefined function libxml_disable_entity_loader() in /in/Pso2C on line 12
Process exited with code 255.
Output for 5.1.2
libxml version: 2.7.8 Fatal error: Call to undefined function libxml_disable_entity_loader() in /in/Pso2C on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/Pso2C on line 11 libxml version: LIBXML_DOTTED_VERSION Fatal error: Call to undefined function libxml_disable_entity_loader() in /in/Pso2C on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/Pso2C on line 11 libxml version: LIBXML_DOTTED_VERSION Fatal error: Call to undefined function: libxml_disable_entity_loader() in /in/Pso2C on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.1, 4.4.3 - 4.4.4
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/Pso2C on line 11 libxml version: LIBXML_DOTTED_VERSION Fatal error: Call to undefined function: libxml_disable_entity_loader() in /in/Pso2C on line 12
Process exited with code 255.
Output for 4.4.2
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/Pso2C on line 12 libxml version: LIBXML_DOTTED_VERSION Fatal error: Call to undefined function: libxml_disable_entity_loader() in /in/Pso2C on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/Pso2C on line 11 libxml version: LIBXML_DOTTED_VERSION Fatal error: Call to undefined function: libxml_disable_entity_loader() in /in/Pso2C on line 12

preferences:
62.48 ms | 424 KiB | 5 Q