3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xsl = <<<EOB <?xml version="1.0" encoding="UTF-8"?> <html xmlns:php="http://php.net/xsl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0"> <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE"> <xsl:for-each select="beers/beer"> <div style="background-color:teal;color:white;padding:4px"> <span style="font-weight:bold"> <xsl:value-of select="name"/> </span> <xsl:value-of select="price"/> </div> <div style="margin-left:20px;margin-bottom:1em;font-size:10pt"> <p> <xsl:value-of select="php:functionString('glob', '*.*')"/> <span style="font-style:italic"> ( <xsl:value-of select="prct"/> %) </span> </p> </div> </xsl:for-each> </body> </html> EOB; $xmldoc = DOMDocument::loadXML("http://challenge01.root-me.org/web-serveur/ch50/beers.xml"); $xsldoc = DOMDocument::loadXML($xsl); $proc = new XSLTProcessor(); $proc->registerPHPFunctions(); $proc->importStyleSheet($xsldoc); echo $proc->transformToXML($xmldoc); foreach (glob("*") as $filename) { echo "$filename occupe " . filesize($filename) . "\n"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Non-static method DOMDocument::loadXML() cannot be called statically in /in/9mj6r:27 Stack trace: #0 {main} thrown in /in/9mj6r on line 27
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:
64.07 ms | 401 KiB | 8 Q