3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>test</p> </body> </html>'; $dom = new DOMDocument(); $dom->formatOutput = false; $dom->loadHTML($html); echo $dom->saveHTML($dom->documentElement) . PHP_EOL . PHP_EOL; echo $dom->saveHTML() . PHP_EOL . PHP_EOL; $dom = new DOMDocument(); $dom->formatOutput = false; $dom->loadHTML($html, LIBXML_PARSEHUGE); echo $dom->saveHTML($dom->documentElement) . PHP_EOL . PHP_EOL; echo $dom->saveHTML() . PHP_EOL . PHP_EOL;

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.4.120.0120.00718.81
8.4.110.0050.01118.25
8.4.100.0110.01118.08
8.4.90.0040.00420.70
8.4.80.0030.00618.98
8.4.70.0060.00219.29
8.4.60.0120.01020.82
8.4.50.0110.00918.76
8.4.40.0140.00719.68
8.4.30.0070.01020.76
8.4.20.0180.00320.04
8.4.10.0060.00917.80
8.3.250.0050.00616.92
8.3.240.0110.00817.10
8.3.230.0140.00616.64
8.3.220.0080.00719.05
8.3.210.0130.00717.04
8.3.200.0050.00717.08
8.3.190.0050.00319.38
8.3.180.0080.00819.13
8.3.170.0150.00417.29
8.3.160.0070.01117.50
8.3.150.0170.00319.25
8.3.140.0030.00617.05
8.3.130.0080.00818.58
8.3.120.0070.01119.17
8.3.110.0060.00320.94
8.3.100.0000.00916.71
8.3.90.0080.00026.77
8.3.80.0060.00317.97
8.3.70.0090.00616.75
8.3.60.0070.00718.55
8.3.50.0090.00424.51
8.3.40.0130.00618.99
8.3.30.0070.00718.88
8.3.20.0080.00021.10
8.3.10.0050.00320.58
8.3.00.0050.00321.02
8.2.290.0110.01016.98
8.2.280.0130.00718.87
8.2.270.0070.00718.61
8.2.260.0040.01517.34
8.2.250.0040.00418.57
8.2.240.0060.00316.91
8.2.230.0140.00422.58
8.2.220.0040.01124.06
8.2.210.0000.00826.77
8.2.200.0060.00318.91
8.2.190.0150.00018.66
8.2.180.0090.01216.75
8.2.170.0150.00022.96
8.2.160.0000.01422.37
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00426.16
8.2.110.0100.01321.25
8.2.100.0040.00717.97
8.2.90.0050.00318.16
8.2.80.0000.01217.97
8.2.70.0030.00518.04
8.2.60.0000.00818.34
8.2.50.0040.00418.10
8.2.40.0060.00319.61
8.2.30.0000.00719.34
8.2.20.0030.00618.31
8.2.10.0040.00419.16
8.2.00.0030.00619.53
8.1.330.0130.00616.11
8.1.320.0080.01018.17
8.1.310.0040.00417.25
8.1.300.0080.00016.36
8.1.290.0030.00718.88
8.1.280.0090.00925.92
8.1.270.0040.00420.86
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00324.04
8.1.230.0100.00721.16
8.1.220.0000.00817.90
8.1.210.0000.00818.77
8.1.200.0000.00817.72
8.1.190.0000.00917.35
8.1.180.0060.00618.10
8.1.170.0080.00018.89
8.1.160.0000.00719.30
8.1.150.0040.00419.13
8.1.140.0080.00020.94
8.1.130.0000.00720.48
8.1.120.0040.00417.63
8.1.110.0000.00817.65
8.1.100.0040.00417.70
8.1.90.0040.00417.71
8.1.80.0080.00317.75
8.1.70.0000.00717.59
8.1.60.0040.00417.74
8.1.50.0050.00317.71
8.1.40.0060.00317.80
8.1.30.0080.00017.88
8.1.20.0060.00317.84
8.1.10.0040.00417.75
8.1.00.0040.00417.67
8.0.300.0000.00719.76
8.0.290.0040.00417.00
8.0.280.0040.00418.70
8.0.270.0090.00017.54
8.0.260.0030.00320.26
8.0.250.0040.00417.13
8.0.240.0030.00317.19
8.0.230.0030.00317.12
8.0.220.0040.00417.13
8.0.210.0000.00717.04
8.0.200.0000.00817.21
8.0.190.0040.00417.14
8.0.180.0030.00617.08
8.0.170.0080.00017.09
8.0.160.0070.00017.04
8.0.150.0040.00417.07
8.0.140.0000.00717.10
8.0.130.0000.00513.55
8.0.120.0000.00817.14
8.0.110.0000.00717.27
8.0.100.0030.00517.14
8.0.90.0000.00917.12
8.0.80.0100.00717.10
8.0.70.0040.00417.04
8.0.60.0080.00017.04
8.0.50.0050.00217.16
8.0.30.0030.01417.33
8.0.20.0040.01517.24
8.0.10.0040.00417.05
8.0.00.0150.00417.18
7.4.330.0000.00515.55
7.4.320.0070.00016.75
7.4.300.0070.00016.92
7.4.290.0020.00516.79
7.4.280.0090.00916.82
7.4.270.0000.00716.66
7.4.260.0050.00013.56
7.4.250.0070.00016.79
7.4.240.0030.00516.78
7.4.230.0070.00016.55
7.4.220.0040.00316.68
7.4.210.0100.00916.74
7.4.200.0030.00316.65
7.4.130.0120.00916.46
7.4.120.0070.01416.52
7.4.110.0070.01016.75
7.4.100.0120.00616.86
7.4.90.0120.00616.59
7.4.80.0070.01019.39
7.4.70.0150.00616.88
7.4.60.0120.00616.66
7.4.50.0060.00916.88
7.4.40.0150.00816.72
7.4.00.0030.00914.88
7.3.330.0040.00416.56
7.3.320.0000.00613.44
7.3.310.0030.00616.45
7.3.300.0080.00016.47
7.3.290.0030.00316.38
7.3.280.0040.01116.50
7.3.260.0130.00916.57
7.3.240.0110.00616.55
7.3.230.0040.01316.70
7.3.210.0110.00516.57
7.3.200.0100.00716.51
7.3.190.0070.01616.78
7.3.180.0060.01016.72
7.3.170.0090.01216.84
7.3.160.0060.01016.58
7.3.120.0000.01514.81
7.3.110.0090.00614.52
7.3.100.0120.02314.36
7.3.90.0110.00314.67
7.3.80.0000.01714.64
7.3.70.0140.00714.66
7.3.60.0100.00814.91
7.3.50.0090.00914.81
7.3.40.0190.00914.92
7.3.30.0030.01114.92
7.3.20.0000.01614.92
7.3.10.0150.01715.07
7.3.00.0100.00414.67
7.2.330.0090.00917.01
7.2.320.0070.01016.90
7.2.310.0140.00716.95
7.2.300.0120.00617.05
7.2.290.0030.01417.04
7.2.250.0060.00915.35
7.2.240.0070.00715.33
7.2.230.0050.00915.13
7.2.220.0090.00915.11
7.2.210.0070.00714.88
7.2.200.0260.02215.04
7.2.190.0030.01215.00
7.2.180.0030.01314.90
7.2.170.0070.00715.10
7.2.160.0130.00314.73
7.2.150.0040.01115.05
7.2.140.0070.01015.19
7.2.130.0050.01015.14
7.2.120.0130.00315.19
7.2.110.0060.00914.91
7.2.100.0090.00614.80
7.2.90.0120.01215.01
7.2.80.0090.00615.10
7.2.70.0000.01515.29
7.2.60.0090.00615.19
7.2.50.0070.00714.91
7.2.40.0090.00615.40
7.2.30.0100.01015.19
7.2.20.0420.01415.14
7.2.10.0030.01215.18
7.2.00.0100.00714.81
7.1.330.0070.00714.05
7.1.320.0120.00313.85
7.1.310.0070.00714.15
7.1.300.0080.00813.84
7.1.290.0160.01313.96
7.1.280.0130.00314.01
7.1.270.0120.00613.72
7.1.260.0100.00313.87
7.1.250.0090.00913.91
5.6.400.0100.00516.00

preferences:
27.61 ms | 403 KiB | 5 Q