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.4.0 - 5.4.13
Parse error: syntax error, unexpected '$doc' (T_VARIABLE) in /in/2mn8B on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected T_VARIABLE in /in/2mn8B on line 3
Process exited with code 255.