3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<user:name test:one = "firstUser" />'; print_r($xml); echo '\n'; echo '\n'; $doc = new DOMDocument(); $xpath = new DOMXPath($doc); $simpleXml = simplexml_load_string($xml); echo '\n'; print_r($simpleXml);
Output for git.master, git.master_jit, rfc.property-hooks
<user:name test:one = "firstUser" />\n\n Warning: simplexml_load_string(): namespace error : Namespace prefix test for one on name is not defined in /in/ijeHp on line 10 Warning: simplexml_load_string(): <user:name test:one = "firstUser" /> in /in/ijeHp on line 10 Warning: simplexml_load_string(): ^ in /in/ijeHp on line 10 Warning: simplexml_load_string(): namespace error : Namespace prefix user on name is not defined in /in/ijeHp on line 10 Warning: simplexml_load_string(): <user:name test:one = "firstUser" /> in /in/ijeHp on line 10 Warning: simplexml_load_string(): ^ in /in/ijeHp on line 10 \nSimpleXMLElement Object ( [@attributes] => Array ( [test:one] => firstUser ) )

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:
29.93 ms | 407 KiB | 5 Q