3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<response type="1">' . ' <body>' . ' <station name="Днепропетровск, главный" code="DN0001" />' . ' <station name="Днепропетровск, южный" code="DN0002" />' . ' <station name="Днепродзержинск" code="DN0081" />' . ' </body>' . '</response>'; $xml = new SimpleXMLIterator($xml); echo json_encode($xml);
Output for git.master, git.master_jit, rfc.property-hooks
{"@attributes":{"type":"1"},"body":{"station":[{"@attributes":{"name":"\u0414\u043d\u0435\u043f\u0440\u043e\u043f\u0435\u0442\u0440\u043e\u0432\u0441\u043a, \u0433\u043b\u0430\u0432\u043d\u044b\u0439","code":"DN0001"}},{"@attributes":{"name":"\u0414\u043d\u0435\u043f\u0440\u043e\u043f\u0435\u0442\u0440\u043e\u0432\u0441\u043a, \u044e\u0436\u043d\u044b\u0439","code":"DN0002"}},{"@attributes":{"name":"\u0414\u043d\u0435\u043f\u0440\u043e\u0434\u0437\u0435\u0440\u0436\u0438\u043d\u0441\u043a","code":"DN0081"}}]}}

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