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 = $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.60.0170.00318.68
8.3.50.0110.00922.36
8.3.40.0060.00919.27
8.3.30.0040.01119.09
8.3.20.0050.00318.94
8.3.10.0060.00321.47
8.3.00.0040.00424.07
8.2.180.0110.00818.81
8.2.170.0000.01522.96
8.2.160.0080.00620.76
8.2.150.0000.00724.18
8.2.140.0030.01024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.57
8.2.110.0030.00721.56
8.2.100.0090.00318.16
8.2.90.0050.00319.59
8.2.80.0000.00817.97
8.2.70.0030.00517.88
8.2.60.0030.00718.30
8.2.50.0090.00018.07
8.2.40.0040.00418.42
8.2.30.0080.00021.75
8.2.20.0030.00618.14
8.2.10.0000.00818.04
8.2.00.0000.00918.03
8.1.280.0110.00425.92
8.1.270.0000.00823.99
8.1.260.0110.00726.35
8.1.250.0000.00828.09
8.1.240.0070.00322.52
8.1.230.0000.01319.38
8.1.220.0000.00818.14
8.1.210.0080.00018.77
8.1.200.0060.00317.73
8.1.190.0000.00917.90
8.1.180.0030.00618.10
8.1.170.0050.00318.96
8.1.160.0030.00519.18
8.1.150.0050.00218.98
8.1.140.0050.00217.80
8.1.130.0040.00418.25
8.1.120.0040.00417.78
8.1.110.0000.00917.84
8.1.100.0040.00417.78
8.1.90.0000.00717.82
8.1.80.0040.00417.83
8.1.70.0070.00017.83
8.1.60.0000.00917.99
8.1.50.0090.00017.88
8.1.40.0040.00417.93
8.1.30.0000.00818.06
8.1.20.0000.00918.06
8.1.10.0040.00418.02
8.1.00.0040.00417.98
8.0.300.0040.00418.77
8.0.290.0000.00817.25
8.0.280.0040.00418.80
8.0.270.0040.00417.70
8.0.260.0000.00617.34
8.0.250.0030.00517.32
8.0.240.0000.00917.34
8.0.230.0030.00317.25
8.0.220.0000.00917.23
8.0.210.0030.00317.37
8.0.200.0000.00617.46
8.0.190.0000.00717.30
8.0.180.0000.00717.26
8.0.170.0000.00717.38
8.0.160.0030.00517.26
8.0.150.0040.00417.41
8.0.140.0000.00817.16
8.0.130.0000.00513.83
8.0.120.0030.00517.27
8.0.110.0020.00517.35
8.0.100.0070.00017.21
8.0.90.0070.00017.04
8.0.80.0060.00917.34
8.0.70.0070.00017.35
8.0.60.0040.00417.28
8.0.50.0000.00817.33
8.0.30.0090.01117.51
8.0.20.0090.01017.59
8.0.10.0040.00417.45
8.0.00.0100.01017.16
7.4.330.0000.00517.22
7.4.320.0000.00816.80
7.4.300.0030.00316.76
7.4.290.0080.00016.99
7.4.280.0030.00316.84
7.4.270.0000.00717.00
7.4.260.0000.00513.61
7.4.250.0040.00416.81
7.4.240.0000.00716.90
7.4.230.0040.00417.07
7.4.220.0060.01316.95
7.4.210.0070.00916.91
7.4.200.0000.00716.93
7.4.190.0030.00616.94
7.4.160.0120.00316.82
7.4.150.0100.01017.40
7.4.140.0060.01217.86
7.4.130.0050.01416.88
7.4.120.0130.00817.09
7.4.110.0070.01016.86
7.4.100.0030.01716.77
7.4.90.0170.00716.97
7.4.80.0070.01419.39
7.4.70.0080.00816.85
7.4.60.0030.01516.91
7.4.50.0000.00716.62
7.4.40.0060.00622.77
7.4.30.0090.01316.71
7.4.00.0110.00415.18
7.3.330.0030.00313.44
7.3.320.0060.00013.52
7.3.310.0000.00716.63
7.3.300.0030.00316.52
7.3.290.0080.00816.74
7.3.280.0140.00416.62
7.3.270.0090.00917.40
7.3.260.0170.00218.24
7.3.250.0060.01116.82
7.3.240.0100.00717.01
7.3.230.0100.00716.82
7.3.210.0090.00916.79
7.3.200.0120.01019.39
7.3.190.0070.01016.71
7.3.180.0120.00316.72
7.3.170.0060.00916.98
7.3.160.0040.01216.71
7.3.120.0060.00914.99
7.2.330.0300.02017.12
7.2.320.0120.00616.90
7.2.310.0160.00817.07
7.2.300.0080.00817.18
7.2.290.0060.01016.86
7.2.00.0140.00019.16
7.1.200.0030.00916.03
7.1.100.0030.00618.29
7.1.70.0040.00417.11
7.1.60.0040.01117.22
7.1.50.0060.00617.18
7.1.40.0000.01416.59
7.1.30.0040.00716.65
7.1.20.0090.00316.89
7.1.10.0030.00516.77
7.1.00.0080.00616.89
7.0.200.0040.00417.02
7.0.190.0050.00217.07
7.0.180.0080.00416.62
7.0.170.0000.00816.40
7.0.160.0040.00416.46
7.0.150.0000.00916.67
7.0.140.0060.00316.55
7.0.130.0000.00716.83
7.0.120.0050.00316.95
7.0.110.0030.00516.53
7.0.100.0000.00716.67
7.0.90.0050.00516.59
7.0.80.0000.00916.69
7.0.70.0030.01016.73
7.0.60.0160.00016.57
7.0.50.0080.00016.46
7.0.40.0040.00715.07
7.0.30.0070.01015.07
7.0.20.0090.00615.07
7.0.10.0030.00915.07
7.0.00.0030.01015.07
5.6.300.0000.04421.00
5.6.290.0060.04221.04
5.6.280.0000.04421.15
5.6.270.0100.03821.07
5.6.260.0070.04121.03
5.6.250.0030.04421.15
5.6.240.0060.04221.05
5.6.230.0030.06021.05
5.6.220.0090.03821.00
5.6.210.0000.04921.16
5.6.200.0070.05221.25
5.6.190.0070.03821.11
5.6.180.0070.06821.14
5.6.170.0100.04821.12
5.6.160.0130.03020.83
5.6.150.0100.03921.11
5.6.140.0000.08921.01
5.6.130.0100.07021.11
5.6.120.0100.04121.21
5.6.110.0160.04921.14
5.6.100.0030.04320.98
5.6.90.0000.05621.07
5.6.80.0030.06820.38
5.6.70.0060.04120.61
5.6.60.0060.05520.23
5.6.50.0070.04520.50
5.6.40.0030.06920.39
5.6.30.0130.03320.44
5.6.20.0030.04120.45
5.6.10.0000.04620.45
5.6.00.0130.06320.65
5.5.380.0070.04017.73
5.5.370.0000.05717.73
5.5.360.0000.05717.73
5.5.350.0140.02917.62
5.5.340.0060.04118.23
5.5.330.0100.06918.18
5.5.320.0030.04317.92
5.5.310.0100.03518.26
5.5.300.0030.04818.24
5.5.290.0070.03718.27
5.5.280.0000.04418.19
5.5.270.0030.04118.08
5.5.260.0090.03717.98
5.5.250.0120.05917.73
5.5.240.0070.03617.31
5.5.230.0030.04517.47
5.5.220.0030.03817.47
5.5.210.0250.03117.60
5.5.200.0100.05617.63
5.5.190.0030.04117.44
5.5.180.0070.03717.48
5.5.160.0040.05017.30
5.5.150.0090.06617.30
5.5.140.0060.06817.54
5.5.130.0040.03917.34
5.5.120.0030.04217.61
5.5.110.0000.04517.61
5.5.100.0060.04017.52
5.5.90.0070.04017.46
5.5.80.0030.03617.43
5.5.70.0040.04017.36
5.5.60.0000.04717.43
5.5.50.0030.04117.33
5.5.40.0030.04317.16
5.5.30.0000.05017.48
5.5.20.0090.03817.42
5.5.10.0130.05417.50
5.5.00.0030.04317.15
5.4.450.0100.06119.61
5.4.440.0030.08719.45
5.4.430.0000.05719.43
5.4.420.0030.04919.46
5.4.410.0000.04919.22
5.4.400.0030.04119.14
5.4.390.0030.06319.16
5.4.380.0030.04119.14
5.4.370.0040.04019.26
5.4.360.0040.06719.14
5.4.350.0070.03719.16
5.4.340.0140.05618.99
5.4.320.0000.05718.99
5.4.310.0030.04519.02
5.4.300.0040.07419.27
5.4.290.0030.04019.15
5.4.280.0030.03819.30
5.4.270.0070.03319.26
5.4.260.0030.07519.14
5.4.250.0030.03819.04
5.4.240.0030.05619.08
5.4.230.0090.03019.03
5.4.220.0000.09019.12
5.4.210.0000.04119.12
5.4.200.0030.06619.24
5.4.190.0030.03719.09
5.4.180.0060.03619.27
5.4.170.0030.05919.01
5.4.160.0120.03119.02
5.4.150.0100.07219.25
5.4.140.0070.03816.53
5.4.130.0030.07416.52
5.4.120.0030.03616.67
5.4.110.0030.04216.70
5.4.100.0000.06016.61
5.4.90.0040.03616.96
5.4.80.0000.04016.61
5.4.70.0030.03816.65
5.4.60.0030.04516.82
5.4.50.0030.03516.47
5.4.40.0100.02916.76
5.4.30.0060.04316.81
5.4.20.0030.03816.67
5.4.10.0000.06116.84
5.4.00.0030.03516.14
5.3.290.0030.07615.07
5.3.280.0000.05015.07
5.3.270.0030.04215.07
5.3.260.0070.04515.07
5.3.250.0030.05215.07
5.3.240.0070.06615.07
5.3.230.0040.03715.07
5.3.220.0040.03515.07
5.3.210.0030.04515.07
5.3.200.0100.06415.07
5.3.190.0100.03915.07
5.3.180.0040.04015.07
5.3.170.0030.03615.07
5.3.160.0000.04115.07
5.3.150.0030.05215.07
5.3.140.0070.05715.07
5.3.130.0070.07215.07
5.3.120.0040.07715.07
5.3.110.0030.05015.07
5.3.100.0000.04015.07
5.3.90.0030.05615.07
5.3.80.0070.06615.07
5.3.70.0000.04715.07
5.3.60.0030.03815.07
5.3.50.0100.03015.07
5.3.40.0000.08015.07
5.3.30.0100.03515.07
5.3.20.0030.03615.07
5.3.10.0100.02615.07
5.3.00.0060.05715.07
5.2.170.0070.04115.07
5.2.160.0000.03915.07
5.2.150.0000.04115.07
5.2.140.0000.03815.07
5.2.130.0000.05115.07
5.2.120.0030.03015.07
5.2.110.0000.06115.07
5.2.100.0030.03015.07
5.2.90.0030.03715.07
5.2.80.0030.02915.07
5.2.70.0030.03115.07
5.2.60.0030.02815.07
5.2.50.0000.04215.07
5.2.40.0070.06015.07
5.2.30.0000.05215.07
5.2.20.0030.06215.07
5.2.10.0030.05115.07
5.2.00.0030.05615.07
5.1.60.0000.05815.07
5.1.50.0100.04915.07
5.1.40.0030.02615.07
5.1.30.0060.02215.07
5.1.20.0030.03415.07
5.1.10.0030.02415.07
5.1.00.0030.02415.07
5.0.50.0100.03715.07
5.0.40.0030.04315.07
5.0.30.0030.07015.07
5.0.20.0040.03215.07
5.0.10.0040.01815.07
5.0.00.0000.03415.07
4.4.90.0000.02615.07
4.4.80.0040.01815.07
4.4.70.0030.01415.07
4.4.60.0070.02615.07
4.4.50.0000.03715.07
4.4.40.0000.03715.07
4.4.30.0030.01415.07
4.4.20.0040.01415.07
4.4.10.0000.03915.07
4.4.00.0000.04615.07
4.3.110.0040.01815.07
4.3.100.0000.03115.07
4.3.90.0000.01815.07
4.3.80.0000.02715.07
4.3.70.0000.01615.07
4.3.60.0030.03615.07
4.3.50.0030.02515.07
4.3.40.0030.03515.07
4.3.30.0000.04115.07
4.3.20.0030.03915.07
4.3.10.0030.03415.07
4.3.00.0030.03315.07

preferences:
43.63 ms | 401 KiB | 5 Q