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><style type='text/css'>div {width:50%;} </style>"; $footer = "<script type='text/javascript'></script>"; $doc = new DOMDocument(); $doc->loadXML($xml); $xp = new DOMXPath($doc); $ctag = $xp->evaluate("//CONTENT")->item(0); $htag = $xp->evaluate("//HEADER")->item(0); $ftag = $xp->evaluate("//FOOTER")->item(0); $ctag->parentNode->replaceChild(new DOMCdataSection($content),$ctag); $htag->parentNode->replaceChild(new DOMCdataSection($header),$htag); $ftag->parentNode->replaceChild(new DOMCdataSection($footer),$ftag); 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)
8.3.40.0110.00719.17
8.3.30.0100.01319.46
8.3.20.0040.00420.59
8.3.10.0040.00424.01
8.3.00.0000.00820.87
8.2.170.0130.00322.96
8.2.160.0070.00722.63
8.2.150.0090.00924.18
8.2.140.0050.00524.66
8.2.130.0070.00026.16
8.2.120.0000.00720.39
8.2.110.0030.00622.74
8.2.100.0080.00418.28
8.2.90.0040.00419.59
8.2.80.0030.00518.28
8.2.70.0030.00618.00
8.2.60.0000.00818.18
8.2.50.0030.00618.07
8.2.40.0040.00419.84
8.2.30.0060.00318.56
8.2.20.0030.00618.05
8.2.10.0000.00819.94
8.2.00.0040.00418.19
8.1.270.0050.00324.21
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00024.08
8.1.230.0090.00319.66
8.1.220.0000.00818.28
8.1.210.0000.00818.77
8.1.200.0070.00317.48
8.1.190.0030.00617.80
8.1.180.0090.00018.10
8.1.170.0030.00619.03
8.1.160.0040.00422.34
8.1.150.0040.00419.07
8.1.140.0080.00017.84
8.1.130.0060.00318.37
8.1.120.0000.00717.71
8.1.110.0030.00517.81
8.1.100.0040.00417.77
8.1.90.0040.00417.84
8.1.80.0070.00017.88
8.1.70.0030.00317.77
8.1.60.0030.00617.93
8.1.50.0060.00317.77
8.1.40.0040.00417.91
8.1.30.0040.00418.06
8.1.20.0030.00517.86
8.1.10.0040.00418.00
8.1.00.0050.00317.99
8.0.300.0070.00018.77
8.0.290.0070.00017.66
8.0.280.0000.00818.89
8.0.270.0030.00317.63
8.0.260.0030.00617.33
8.0.250.0000.00617.39
8.0.240.0070.00017.50
8.0.230.0030.00317.44
8.0.220.0070.00017.22
8.0.210.0030.00317.38
8.0.200.0000.00617.34
8.0.190.0040.00417.37
8.0.180.0000.00817.30
8.0.170.0000.00717.44
8.0.160.0050.00217.43
8.0.150.0090.00017.33
8.0.140.0040.00417.17
8.0.130.0030.00313.75
8.0.120.0000.00817.32
8.0.110.0000.00717.27
8.0.100.0030.00617.33
8.0.90.0000.00717.27
8.0.80.0030.01317.27
8.0.70.0040.00417.38
8.0.60.0050.00217.10
8.0.50.0030.00517.33
8.0.30.0120.00817.53
8.0.20.0090.01117.53
8.0.10.0050.00317.33
8.0.00.0110.00717.31
7.4.330.0030.00315.49
7.4.320.0060.00016.92
7.4.300.0000.00716.79
7.4.290.0000.00717.00
7.4.280.0040.00416.91
7.4.270.0030.00316.87
7.4.260.0000.00716.80
7.4.250.0000.00816.81
7.4.240.0020.00516.94
7.4.230.0000.00716.68
7.4.220.0070.01116.87
7.4.210.0100.00516.97
7.4.200.0000.00716.70
7.4.190.0070.00017.11
7.4.160.0080.00817.11
7.4.150.0100.00717.40
7.4.140.0070.01217.86
7.4.130.0110.00917.00
7.4.120.0070.01316.99
7.4.110.0130.01016.90
7.4.100.0130.01016.92
7.4.90.0070.01316.85
7.4.80.0130.00316.86
7.4.70.0130.00316.90
7.4.60.0090.00917.02
7.4.50.0000.00816.94
7.4.40.0040.01122.77
7.4.30.0100.01316.95
7.4.00.0030.01015.36
7.3.330.0060.00013.45
7.3.320.0030.00313.56
7.3.310.0000.00716.73
7.3.300.0000.00716.70
7.3.290.0100.00316.63
7.3.280.0070.01416.65
7.3.270.0090.00917.40
7.3.260.0170.00717.07
7.3.250.0120.00516.63
7.3.240.0070.01116.65
7.3.230.0200.00416.86
7.3.210.0040.01516.81
7.3.200.0030.01619.39
7.3.190.0070.01016.75
7.3.180.0080.00816.77
7.3.170.0040.01316.62
7.3.160.0090.01316.66
7.3.120.0000.01114.71
7.2.330.0120.00916.80
7.2.320.0090.01217.28
7.2.310.0120.00916.89
7.2.300.0050.01516.85
7.2.290.0070.01117.06
7.2.00.0070.00719.26
7.1.100.0000.01518.44
7.1.70.0040.00417.02
7.1.60.0070.00719.32
7.1.50.0100.01417.07
7.1.00.0000.07722.62
7.0.200.0000.00716.63
7.0.140.0030.07322.10
7.0.100.0070.04020.14
7.0.90.0030.05020.30
7.0.80.0100.04720.15
7.0.70.0000.04720.25
7.0.60.0030.04320.13
7.0.50.0030.04720.46
7.0.40.0070.04020.23
7.0.30.0130.03020.22
7.0.20.0030.04320.31
7.0.10.0070.05320.26
7.0.00.0000.04720.21
5.6.280.0000.07721.14
5.6.250.0030.04320.79
5.6.240.0200.02321.00
5.6.230.0070.03720.93
5.6.220.0030.04020.89
5.6.210.0070.04020.97
5.6.200.0070.04721.35
5.6.190.0100.03721.24
5.6.180.0130.03321.32
5.6.170.0030.04321.23
5.6.160.0030.04321.20
5.6.150.0030.04721.29
5.6.140.0070.05021.34
5.6.130.0070.06721.26
5.6.120.0030.07021.22
5.6.110.0070.07321.19
5.6.100.0070.04321.22
5.6.90.0100.07021.24
5.6.80.0100.04320.60
5.6.70.0030.07020.68
5.6.60.0100.07020.61
5.6.50.0200.05320.59
5.6.40.0100.05720.62
5.6.30.0070.07320.58
5.6.20.0030.08720.50
5.6.10.0070.04320.50
5.6.00.0230.06320.55
5.5.380.0030.04020.81
5.5.370.0030.04720.57
5.5.360.0030.04320.49
5.5.350.0070.03720.71
5.5.340.0000.05021.06
5.5.330.0100.03321.08
5.5.320.0130.03321.11
5.5.310.0030.04020.93
5.5.300.0100.04721.03
5.5.290.0100.08021.09
5.5.280.0030.05020.94
5.5.270.0170.07320.95
5.5.260.0100.08321.12
5.5.250.0030.08020.84
5.5.240.0100.07320.32
5.5.230.0200.06020.43
5.5.220.0100.04020.43
5.5.210.0070.07720.44
5.5.200.0030.08020.34
5.5.190.0070.04020.44
5.5.180.0070.07720.37
5.5.160.0100.07020.32
5.5.150.0030.08020.33
5.5.140.0200.06320.40
5.5.130.0200.06320.46
5.5.120.0170.04020.38
5.5.110.0070.06720.27
5.5.100.0070.07320.36
5.5.90.0000.07320.34
5.5.80.0030.05320.26
5.5.70.0070.07320.22
5.5.60.0030.04720.34
5.5.50.0100.06020.25
5.5.40.0070.06720.33
5.5.30.0070.03720.29
5.5.20.0170.07320.29
5.5.10.0130.07320.28
5.5.00.0100.06720.29
5.4.450.0100.07719.57
5.4.440.0070.05319.59
5.4.430.0030.05319.31
5.4.420.0070.04719.55
5.4.410.0070.07019.43
5.4.400.0100.07319.10
5.4.390.0200.05719.29
5.4.380.0070.07719.23
5.4.370.0070.03719.18
5.4.360.0030.04719.28
5.4.350.0130.05319.19
5.4.340.0070.07319.24
5.4.320.0070.07719.26
5.4.310.0030.07319.09
5.4.300.0070.05019.27
5.4.290.0330.04319.32
5.4.280.0000.07719.23
5.4.270.0130.05019.44
5.4.260.0070.07719.29
5.4.250.0200.06318.99
5.4.240.0070.05719.24
5.4.230.0030.04719.28
5.4.220.0070.04719.27
5.4.210.0070.06719.43
5.4.200.0070.04719.17
5.4.190.0030.05019.43
5.4.180.0200.05718.98
5.4.170.0000.07019.22
5.4.160.0130.07019.29
5.4.150.0130.07018.95
5.4.140.0100.06016.63
5.4.130.0100.07016.64
5.4.120.0130.06716.59
5.4.110.0000.05016.49
5.4.100.0200.06316.63
5.4.90.0170.05016.54
5.4.80.0100.04016.53
5.4.70.0030.04316.69
5.4.60.0000.04016.60
5.4.50.0030.04316.67
5.4.40.0070.07016.45
5.4.30.0070.07316.51
5.4.20.0030.07016.58
5.4.10.0100.05716.57
5.4.00.0100.05716.05
5.3.290.0030.04714.81
5.3.280.0100.05714.62
5.3.270.0070.07714.67
5.3.260.0070.07314.84
5.3.250.0070.08714.84
5.3.240.0070.06714.77
5.3.230.0070.07714.62
5.3.220.0130.06014.80
5.3.210.0030.06314.71
5.3.200.0100.07314.77
5.3.190.0070.06714.70
5.3.180.0070.07314.79
5.3.170.0030.06714.79
5.3.160.0070.03714.68
5.3.150.0100.05014.71
5.3.140.0130.06714.63
5.3.130.0100.07314.68
5.3.120.0100.07014.79
5.3.110.0070.05314.79
5.3.100.0070.07014.26
5.3.90.0030.07014.16
5.3.80.0070.04714.19
5.3.70.0100.05014.15
5.3.60.0000.04014.12
5.3.50.0070.05714.15
5.3.40.0070.06314.13
5.3.30.0000.05714.08
5.3.20.0070.04313.84
5.3.10.0100.05713.79
5.3.00.0070.07013.87
5.2.170.0000.06012.35
5.2.160.0030.04012.35
5.2.150.0030.05312.35
5.2.140.0070.02312.35
5.2.130.0030.04012.35
5.2.120.0000.06012.35
5.2.110.0070.05312.35
5.2.100.0000.03312.35
5.2.90.0000.07312.35
5.2.80.0070.06312.35
5.2.70.0070.05012.35
5.2.60.0130.04712.35
5.2.50.0000.04012.35
5.2.40.0030.06012.35
5.2.30.0100.05712.35
5.2.20.0030.06312.35
5.2.10.0030.04012.35
5.2.00.0000.03312.35
5.1.60.0030.03712.35
5.1.50.0000.03312.35
5.1.40.0030.02712.35
5.1.30.0030.05012.35
5.1.20.0070.04012.35
5.1.10.0100.04712.35
5.1.00.0070.04712.35
5.0.50.0000.04712.35
5.0.40.0070.01712.35
5.0.30.0000.05712.35
5.0.20.0030.02712.35
5.0.10.0070.02312.35
5.0.00.0030.06712.35
4.4.90.0070.03312.35
4.4.80.0030.02012.35
4.4.70.0070.03012.35
4.4.60.0030.03012.35
4.4.50.0070.01712.35
4.4.40.0030.04712.35
4.4.30.0030.03312.35
4.4.20.0030.02712.35
4.4.10.0030.02712.35
4.4.00.0030.04012.35
4.3.110.0070.01312.35
4.3.100.0000.02312.35
4.3.90.0070.01312.35
4.3.80.0070.04312.35
4.3.70.0030.01712.35
4.3.60.0030.03312.35
4.3.50.0000.03312.35
4.3.40.0000.05712.35
4.3.30.0000.04012.35
4.3.20.0030.02012.35
4.3.10.0000.02012.35
4.3.00.0000.02712.35

preferences:
39.1 ms | 400 KiB | 5 Q