3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <smses count="1099"> <sms protocol="0" address="" date="" type="" subject="" body="" toa="null" sc_toa="null" service_center="null" read="1" status="-1" locked="0" date_sent="null" readable_date="" contact_name="" /> </smses> XML; $dom = new DOMDocument(); $dom->loadXML($xml); $smses = $dom->getElementsByTagName('sms'); foreach ($smses as $sms) { foreach ($sms->attributes as $attr) { $name = $attr->nodeName; $value = $attr->nodeValue; echo "Attribute '$name' :: '$value'"; } }
Output for git.master, git.master_jit, rfc.property-hooks
Attribute 'protocol' :: '0'Attribute 'address' :: ''Attribute 'date' :: ''Attribute 'type' :: ''Attribute 'subject' :: ''Attribute 'body' :: ''Attribute 'toa' :: 'null'Attribute 'sc_toa' :: 'null'Attribute 'service_center' :: 'null'Attribute 'read' :: '1'Attribute 'status' :: '-1'Attribute 'locked' :: '0'Attribute 'date_sent' :: 'null'Attribute 'readable_date' :: ''Attribute 'contact_name' :: ''

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