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("first_string2", "this is <mystring> &euro; > $"); $xml->addChild("second_string",htmlentities("this is <mystring> &euro; > $")); echo $xml->first_string . "\n"; echo $xml->first_string2 . "\n"; echo $xml->second_string;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
163.95 ms | 2820 KiB | 9 Q