Fatal error: Uncaught TypeError: SimpleXMLElement::addChild(): Argument #2 ($value) must be of type ?string, DateTime given in /in/cmVIH:61
Stack trace:
#0 /in/cmVIH(61): SimpleXMLElement->addChild('birthday', Object(DateTime))
#1 /in/cmVIH(16): arrayToXML(Array, Object(SimpleXMLElementExtended))
#2 {main}
thrown in /in/cmVIH on line 61
Process exited with code 255.
Warning: SimpleXMLElement::addChild() expects parameter 2 to be string, object given in /in/cmVIH on line 61
<?xml version="1.0"?>
<data><id>1</id><name>Jacopo</name><male>1</male><hobbies><item>Programming</item><item>TV Shows</item><item>Skiing</item></hobbies></data>
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/cmVIH on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cmVIH on line 22
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cmVIH on line 22
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/cmVIH on line 22
Process exited with code 255.