3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <html> <head><HEADER/></head> <body> <ul> <li><a href="page2">page2</a> </li> </ul> <CONTENT/> </body> <FOOTER/> </html> XML; $content = "<div id='main'>asdf asdf</div>"; $header = "<title>page 1</title>"; $footer = "<script type='text/javascript'></script>"; $doc = new DOMDocument(); $doc->loadXML($xml); $xp = new DOMXPath($doc); $ctag = $doc->getElementsByTagName("CONTENT")->item(0); $ctag->parentNode->replaceChild(new DOMCdataSection($content)),$ctag); echo $doc->saveHTML();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.100.0090.04312.01
5.4.90.0130.05212.01
5.4.80.0070.04612.01
5.4.70.0090.04412.00
5.4.60.0090.04312.00
5.4.50.0110.04312.01
5.4.40.0110.04111.99
5.4.30.0130.04111.99
5.4.20.0100.04311.99
5.4.10.0140.05011.99
5.4.00.0090.04311.48
5.3.200.0100.04812.68
5.3.190.0150.05712.68
5.3.180.0110.04712.67
5.3.170.0110.04412.67
5.3.160.0100.04412.67
5.3.150.0120.04412.68
5.3.140.0140.04512.66
5.3.130.0150.04712.66
5.3.120.0120.05312.66
5.3.110.0190.06412.66
5.3.100.0090.04512.12
5.3.90.0080.04512.08
5.3.80.0130.04012.08
5.3.70.0110.04312.07
5.3.60.0100.04312.06
5.3.50.0110.04212.00
5.3.40.0120.04112.00
5.3.30.0180.05711.95
5.3.20.0090.04211.73
5.3.10.0140.03811.70
5.3.00.0110.04011.68

preferences:
139.12 ms | 1394 KiB | 7 Q