3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<artists page="1" perPage="100" totalPages="253081" total="25308020"> <artist> <name>David Bowie</name> <playcount>151727648</playcount> <listeners>3969219</listeners> <mbid>5441c29d-3602-4898-b1a1-b77fa23b8e50</mbid> <url>http://www.last.fm/music/David+Bowie</url> <streamable>0</streamable> <image size="small"> http://img2-ak.lst.fm/i/u/34s/937d62bb145040b9b709319c1e680037.png </image> <image size="medium"> http://img2-ak.lst.fm/i/u/64s/937d62bb145040b9b709319c1e680037.png </image> <image size="large"> http://img2-ak.lst.fm/i/u/174s/937d62bb145040b9b709319c1e680037.png </image> <image size="extralarge"> http://img2-ak.lst.fm/i/u/300x300/937d62bb145040b9b709319c1e680037.png </image> <image size="mega"> http://img2-ak.lst.fm/i/u/937d62bb145040b9b709319c1e680037.png </image> </artist> <artist> <name>The Beatles</name> <playcount>456495139</playcount> <listeners>3986977</listeners> <mbid>b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d</mbid> <url>http://www.last.fm/music/The+Beatles</url> <streamable>0</streamable> <image size="small"> http://img2-ak.lst.fm/i/u/34s/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="medium"> http://img2-ak.lst.fm/i/u/64s/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="large"> http://img2-ak.lst.fm/i/u/174s/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="extralarge"> http://img2-ak.lst.fm/i/u/300x300/55efc33bcd234fd8a1d65b3d49bf9661.png </image> <image size="mega"> http://img2-ak.lst.fm/i/u/55efc33bcd234fd8a1d65b3d49bf9661.png </image> </artist> </artists>'; $doc = new DOMDocument(); $doc->loadXML($xml, LIBXML_PARSEHUGE); $artists = $doc->getElementsByTagName('artist'); foreach($artists as $artist) { var_dump($artist); }
Output for git.master, git.master_jit, rfc.property-hooks
object(DOMElement)#4 (23) { ["schemaTypeInfo"]=> NULL ["tagName"]=> string(6) "artist" ["firstElementChild"]=> string(22) "(object value omitted)" ["lastElementChild"]=> string(22) "(object value omitted)" ["childElementCount"]=> int(11) ["previousElementSibling"]=> NULL ["nextElementSibling"]=> string(22) "(object value omitted)" ["nodeName"]=> string(6) "artist" ["nodeValue"]=> string(453) " David Bowie 151727648 3969219 5441c29d-3602-4898-b1a1-b77fa23b8e50 http://www.last.fm/music/David+Bowie 0 http://img2-ak.lst.fm/i/u/34s/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/64s/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/174s/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/300x300/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/937d62bb145040b9b709319c1e680037.png " ["nodeType"]=> int(1) ["parentNode"]=> string(22) "(object value omitted)" ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> string(22) "(object value omitted)" ["lastChild"]=> string(22) "(object value omitted)" ["previousSibling"]=> string(22) "(object value omitted)" ["nextSibling"]=> string(22) "(object value omitted)" ["attributes"]=> string(22) "(object value omitted)" ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> string(6) "artist" ["baseURI"]=> string(1) "/" ["textContent"]=> string(453) " David Bowie 151727648 3969219 5441c29d-3602-4898-b1a1-b77fa23b8e50 http://www.last.fm/music/David+Bowie 0 http://img2-ak.lst.fm/i/u/34s/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/64s/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/174s/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/300x300/937d62bb145040b9b709319c1e680037.png http://img2-ak.lst.fm/i/u/937d62bb145040b9b709319c1e680037.png " } object(DOMElement)#5 (23) { ["schemaTypeInfo"]=> NULL ["tagName"]=> string(6) "artist" ["firstElementChild"]=> string(22) "(object value omitted)" ["lastElementChild"]=> string(22) "(object value omitted)" ["childElementCount"]=> int(11) ["previousElementSibling"]=> string(22) "(object value omitted)" ["nextElementSibling"]=> NULL ["nodeName"]=> string(6) "artist" ["nodeValue"]=> string(453) " The Beatles 456495139 3986977 b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d http://www.last.fm/music/The+Beatles 0 http://img2-ak.lst.fm/i/u/34s/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/64s/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/174s/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/300x300/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/55efc33bcd234fd8a1d65b3d49bf9661.png " ["nodeType"]=> int(1) ["parentNode"]=> string(22) "(object value omitted)" ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> string(22) "(object value omitted)" ["lastChild"]=> string(22) "(object value omitted)" ["previousSibling"]=> string(22) "(object value omitted)" ["nextSibling"]=> string(22) "(object value omitted)" ["attributes"]=> string(22) "(object value omitted)" ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> string(6) "artist" ["baseURI"]=> string(1) "/" ["textContent"]=> string(453) " The Beatles 456495139 3986977 b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d http://www.last.fm/music/The+Beatles 0 http://img2-ak.lst.fm/i/u/34s/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/64s/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/174s/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/300x300/55efc33bcd234fd8a1d65b3d49bf9661.png http://img2-ak.lst.fm/i/u/55efc33bcd234fd8a1d65b3d49bf9661.png " }

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:
70.72 ms | 409 KiB | 8 Q