3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="utf-8"?> <rss xmlns:g="http://base.google.com/ns/1.0" version="2.0"> <channel> <title>werwer</title> <link>werwerwe</link> <item> <g:id>704667</g:id> <title>Nike</title> <description>erterterter</description> </item> <item> <g:id>4456456</g:id> <title>Nike</title> <description>erterterter</description> </item> </channel></rss>'; $xml = simplexml_load_string($xml); $ns = $xml->getNamespaces(true); foreach ($xml->channel->item as $item) { echo $item->children($ns['g'])->id.PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
704667 4456456

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:
132.71 ms | 405 KiB | 5 Q