3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<'XML' <?xml version="1.0" encoding="UTF-8"?> <resume> <personal_info> <birthdate>07/08/1988</birthdate> </personal_info> <jobs> <job> <company>Radio Shack</company> <title>Sales Representative</title> <startdate>01/01/2011</startdate> <enddate>02/02/2011</enddate> <duration>1.5yrs</duration> <sortdate>20110101</sortdate> </job> <job> <company>Radio Shack2</company> <title>Sales Representative</title> <startdate>01/01/2013</startdate> <enddate>02/02/2013</enddate> <duration>1.5yrs</duration> <sortdate>20130202</sortdate> </job> </jobs> </resume> XML; $xslt = <<<'XSLT' <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>My Word Download</h2> <xsl:for-each select="resume/jobs/job"> <xsl:sort select="sortdate" data-type="number" order="descending" /> <div> <xsl:value-of select="company" /> - <xsl:value-of select="title"/> </div> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> XSLT; $xmlDom = new DOMDocument(); $xmlDom->loadXml($xml); $xslDom = new DOMDocument(); //$xslDOM->load($xsltFile); $xslDom->loadXml($xslt); $processor = new XsltProcessor(); $processor->importStylesheet($xslDom); echo $processor->transformToXml($xmlDom);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "XsltProcessor" not found in /in/5v5S7:58 Stack trace: #0 {main} thrown in /in/5v5S7 on line 58
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:
50.67 ms | 401 KiB | 8 Q