3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument(); $doc->loadXML('<example xmlns:foo="urn:foo"><foo:bar/></example>'); $bars = $doc->getElementsByTagNameNS('urn:foo', 'bar'); echo $bars->item(0)->nodeName; echo PHP_EOL; echo LIBXML_DOTTED_VERSION;
Output for 5.6.28, 7.0.12 - 7.1.0
foo:bar 2.9.4
Output for 5.5.24 - 5.6.15, 5.6.17 - 5.6.21, hhvm-3.12.0, 7.0.1 - 7.0.6
foo:bar 2.9.3
Output for 5.4.0 - 5.4.45, 5.6.16, hhvm-3.10.0, 7.0.0
foo:bar 2.9.2
Output for 5.3.25 - 5.3.29
foo:bar 2.9.1
Output for 5.3.15 - 5.3.24
foo:bar 2.8.0
Output for 5.1.0 - 5.3.14
foo:bar 2.7.8
Output for 5.0.2 - 5.0.5
foo:bar Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/G2Nml on line 9 LIBXML_DOTTED_VERSION
Output for 5.0.0 - 5.0.1
foo:bar Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/G2Nml on line 8 PHP_EOL Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/G2Nml on line 9 LIBXML_DOTTED_VERSION
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/G2Nml on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/G2Nml on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/G2Nml on line 6
Process exited with code 255.