3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link http://stackoverflow.com/q/24526493/367456 */ $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN" "http://jats.nlm.nih.gov/publishing/1.0/JATS-journalpublishing1.dtd"> <article/> XML; libxml_set_external_entity_loader(function() { var_dump(func_get_args()); return NULL; }); $doc = new DOMDocument; $doc->loadXML($xml, LIBXML_DTDLOAD); echo "----\n"; libxml_set_external_entity_loader(NULL); $doc = new DOMDocument; $doc->loadXML($xml, LIBXML_DTDLOAD);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> string(66) "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN" [1]=> string(66) "http://jats.nlm.nih.gov/publishing/1.0/JATS-journalpublishing1.dtd" [2]=> array(4) { ["directory"]=> string(1) "/" ["intSubName"]=> string(7) "article" ["extSubURI"]=> string(66) "http://jats.nlm.nih.gov/publishing/1.0/JATS-journalpublishing1.dtd" ["extSubSystem"]=> string(66) "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN" } } Warning: DOMDocument::loadXML(): Failed to load external entity "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN" in Entity, line: 2 in /in/jemmH on line 18 ---- Warning: DOMDocument::loadXML(): php_network_getaddresses: getaddrinfo for jats.nlm.nih.gov failed: System error in /in/jemmH on line 25 Warning: DOMDocument::loadXML(http://jats.nlm.nih.gov/publishing/1.0/JATS-journalpublishing1.dtd): Failed to open stream: php_network_getaddresses: getaddrinfo for jats.nlm.nih.gov failed: System error in /in/jemmH on line 25 Notice: DOMDocument::loadXML(): failed to load external entity "http://jats.nlm.nih.gov/publishing/1.0/JATS-journalpublishing1.dtd" in Entity, line: 2 in /in/jemmH on line 25

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:
44.93 ms | 403 KiB | 8 Q