3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_header = "<?xml version='1.0' encoding='utf-8'?><xml/>"; $xml = new SimpleXMLElement($xml_header); $xml->addChild("first_string","this is &amp;lt;mystring&gt; &amp;euro; &amp;gt; $"); $xml->addChild("second_string",htmlentities("this is <mystring> &euro; > $")); echo $xml->first_string . $xml->second_string;

preferences:
35.84 ms | 405 KiB | 6 Q