3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOD <rss xmlns:media="http://search.yahoo.com/mrss/" version="2.0"> <media:content medium="media.medium" href="src='http://res.cloudinary.com/cermati/image/upload/c_fill,h_300,w_300/ctjaru9g6c7lowxifxol' height='300' width='300'" height="300" width="300"> <media:thumbnail medium="media.thumb.medium" href="<img src='http://res.cloudinary.com/cermati/image/upload/c_thumb,h_120,w_120/ctjaru9g6c7lowxifxol' height='120' width='120'/>" height="120" width="120"/> </media:content> </rss> EOD; $sxe = new SimpleXMLElement($xml); $sxe->registerXPathNamespace('c', 'http://example.org/chapter-title'); $result = $sxe->xpath('//c:title'); foreach ($result as $title) { echo $title . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Unescaped '<' not allowed in attributes values in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): <media:thumbnail medium="media.thumb.medium" href="<img src='http://res.cloudina in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : attributes construct error in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): <media:thumbnail medium="media.thumb.medium" href="<img src='http://res.cloudina in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Couldn't find end of Start Tag thumbnail line 3 in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): <media:thumbnail medium="media.thumb.medium" href="<img src='http://res.cloudina in /in/hcf5k on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/hcf5k on line 10 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/hcf5k:10 Stack trace: #0 /in/hcf5k(10): SimpleXMLElement->__construct('<rss xmlns:medi...') #1 {main} thrown in /in/hcf5k on line 10
Process exited with code 255.

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:
66.76 ms | 403 KiB | 8 Q