3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'id' => 1, 'name' => 'Jacopo', 'male' => true, 'birthday' => new DateTime('1988-07-26'), 'hobbies' => array( 'Programming', 'TV Shows', 'Skiing' ) ); $xml = new SimpleXMLElement('<root/>'); array_walk_recursive($a, array ($xml, 'addChild')); print $xml->asXML();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: SimpleXMLElement::addChild(): Argument #1 ($qualifiedName) must be of type string, DateTime given in /in/KgWjt:15 Stack trace: #0 [internal function]: SimpleXMLElement->addChild(Object(DateTime), 'birthday') #1 /in/KgWjt(15): array_walk_recursive(Array, Array) #2 {main} thrown in /in/KgWjt on line 15
Process exited with code 255.

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