3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "<?xml version='1.0' encoding='UTF-8'?> <note> <to>Tove</to> <from>Jani</from> <heading>123</heading> <body>Don't forget me this weekend!</body> </note> "; $sxe = new SimpleXMLElement($string); $sxe->addAttribute('test', '2312'); echo $sxe->test; print_r($sxe);
Output for git.master, git.master_jit, rfc.property-hooks
SimpleXMLElement Object ( [@attributes] => Array ( [test] => 2312 ) [to] => Tove [from] => Jani [heading] => 123 [body] => Don't forget me this weekend! )

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:
62.18 ms | 401 KiB | 8 Q