3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image id="my-image" xlink:href="http://example.com/image.png" /> </svg> '); $xml->registerXPathNamespace('svg', 'http://www.w3.org/2000/svg'); $xml->registerXPathNamespace('xlink', 'http://www.w3.org/1999/xlink'); $images = $xml->xpath('//svg:image[@xlink:href]'); foreach ($images as $image) { var_dump($image); }
Output for git.master, git.master_jit, rfc.property-hooks
object(SimpleXMLElement)#2 (1) { ["@attributes"]=> array(1) { ["id"]=> string(8) "my-image" } }

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