3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don\'t forget me this weekend!</body> <recursive> <val>2</val> <val>4</val> </recursive> </note>'; $xml1 = new SimpleXmlIterator($str, 0, false); $xml = (array) $xml1; echo $xml['note']['to']; echo $xml['note']['recursive']['val'][0];
Output for git.master, git.master_jit
Warning: Undefined array key "note" in /in/cnQ8D on line 19 Warning: Trying to access array offset on value of type null in /in/cnQ8D on line 19 Warning: Undefined array key "note" in /in/cnQ8D on line 20 Warning: Trying to access array offset on value of type null in /in/cnQ8D on line 20 Warning: Trying to access array offset on value of type null in /in/cnQ8D on line 20 Warning: Trying to access array offset on value of type null in /in/cnQ8D on line 20
Output for rfc.property-hooks
Warning: Undefined array key "note" in /in/cnQ8D on line 19 Warning: Trying to access array offset on null in /in/cnQ8D on line 19 Warning: Undefined array key "note" in /in/cnQ8D on line 20 Warning: Trying to access array offset on null in /in/cnQ8D on line 20 Warning: Trying to access array offset on null in /in/cnQ8D on line 20 Warning: Trying to access array offset on null in /in/cnQ8D on line 20

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:
46.11 ms | 402 KiB | 8 Q