3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<EOF <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>test</title> </head> <body> <form> <input type="text" required>test <input type="submit">test </form> <img src="foo.png"> <h1>title</h1> </body> </html> EOF; libxml_use_internal_errors(true); libxml_clear_errors(); $dom = new DOMDocument; $dom->recover = true; $r = $dom->loadHTML($html, LIBXML_NOBLANKS // remove blank nodes | LIBXML_NOCDATA // merge CDATA as text nodes | LIBXML_NONET // disable network access when loading documents | LIBXML_NOWARNING); if(!$r) die('failed to load'); echo $dom->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.0070.01416.63
8.3.50.0070.01016.63
8.3.40.0070.01419.04
8.3.30.0080.00819.13
8.3.20.0050.00320.41
8.3.10.0040.00423.64
8.3.00.0080.00017.93
8.2.180.0090.00616.98
8.2.170.0120.00322.96
8.2.160.0130.00020.61
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0000.00726.16
8.2.110.0040.00721.28
8.2.100.0080.00318.16
8.2.90.0030.00618.16
8.2.80.0090.00018.00
8.2.70.0090.00017.84
8.2.60.0000.00818.04
8.2.50.0040.00418.07
8.2.40.0050.00518.47
8.2.30.0080.00018.41
8.2.20.0020.00518.31
8.2.10.0050.00418.19
8.2.00.0040.00418.24
8.1.280.0120.00925.92
8.1.270.0030.00524.09
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0070.00322.78
8.1.230.0060.00621.19
8.1.220.0040.00417.91
8.1.210.0030.00519.07
8.1.200.0030.00617.48
8.1.190.0050.00317.60
8.1.180.0000.00918.10
8.1.170.0030.00618.64
8.1.160.0030.00519.20
8.1.150.0020.00520.81
8.1.140.0040.00419.72
8.1.130.0030.00319.21
8.1.120.0000.00817.63
8.1.110.0050.00317.64
8.1.100.0050.00217.75
8.1.90.0000.00717.75
8.1.80.0040.00417.64
8.1.70.0000.00717.75
8.1.60.0050.00317.80
8.1.50.0080.00017.77
8.1.40.0040.00417.76
8.1.30.0080.00017.85
8.1.20.0090.00317.85
8.1.10.0040.00417.88
8.1.00.0040.00417.71
8.0.300.0040.00420.34
8.0.290.0080.00016.75
8.0.280.0000.00818.72
8.0.270.0000.00717.13
8.0.260.0000.00717.27
8.0.250.0030.00317.28
8.0.240.0040.00417.23
8.0.230.0070.00017.13
8.0.220.0040.00417.21
8.0.210.0080.00017.27
8.0.200.0080.00017.31
8.0.190.0000.00817.27
8.0.180.0000.00817.17
8.0.170.0000.00817.17
8.0.160.0000.00717.24
8.0.150.0000.00717.05
8.0.140.0000.00717.21
8.0.130.0030.00313.73
8.0.120.0080.00017.27
8.0.110.0000.00817.17
8.0.100.0050.00316.96
8.0.90.0040.00417.29
8.0.80.0080.00717.03
8.0.70.0040.00417.29
8.0.60.0050.00316.90
8.0.50.0080.00017.16
8.0.30.0110.00817.29
8.0.20.0120.00717.41
8.0.10.0040.00417.18
8.0.00.0060.01217.05
7.4.330.0000.00515.55
7.4.320.0060.00016.73
7.4.300.0030.00316.66
7.4.290.0030.00616.79
7.4.280.0080.00016.59
7.4.270.0000.00816.83
7.4.260.0000.00716.79
7.4.250.0080.00016.83
7.4.240.0040.00416.72
7.4.230.0030.00316.59
7.4.220.0060.01316.82
7.4.210.0130.00416.95
7.4.200.0000.00716.85
7.4.160.0060.00916.84
7.4.150.0120.00517.40
7.4.140.0090.01017.86
7.4.130.0060.01316.88
7.4.120.0110.00716.73
7.4.110.0070.01116.72
7.4.100.0070.01016.69
7.4.90.0070.01116.63
7.4.80.0110.00719.39
7.4.70.0070.01016.56
7.4.60.0090.00616.88
7.4.50.0130.00316.63
7.4.40.0100.00616.62
7.4.30.0070.01016.70
7.4.00.0170.00015.05
7.3.330.0000.00613.41
7.3.320.0050.00013.39
7.3.310.0030.00516.67
7.3.300.0070.00016.43
7.3.290.0040.01216.53
7.3.280.0070.01016.58
7.3.270.0120.00617.40
7.3.260.0120.00516.73
7.3.250.0150.00716.71
7.3.240.0110.01016.49
7.3.230.0080.00816.62
7.3.210.0110.01116.49
7.3.200.0100.00616.77
7.3.190.0090.00916.52
7.3.180.0150.00616.68
7.3.170.0070.01016.53
7.3.160.0030.01316.88
7.3.10.0040.01016.65
7.3.00.0060.00616.61
7.2.330.0110.00616.91
7.2.320.0110.00816.92
7.2.310.0070.01016.77
7.2.300.0090.00916.66
7.2.290.0130.00216.96
7.2.130.0050.01116.94
7.2.120.0100.00716.88
7.2.110.0030.00916.79
7.2.100.0070.00516.89
7.2.90.0030.00716.98
7.2.80.0060.00817.07
7.2.70.0040.01316.89
7.2.60.0040.00916.84
7.2.50.0030.01317.21
7.2.40.0030.01217.09
7.2.30.0010.01116.94
7.2.20.0090.00317.12
7.2.10.0100.00317.05
7.2.00.0040.01117.92
7.1.250.0040.00715.57
7.1.240.0020.01215.65
7.1.230.0050.00815.63
7.1.220.0080.00715.54
7.1.210.0110.00515.63
7.1.200.0070.00615.72
7.1.190.0060.00715.62
7.1.180.0070.00715.89
7.1.170.0020.00915.67
7.1.160.0040.00815.75
7.1.150.0110.00315.71
7.1.140.0060.00815.69
7.1.130.0040.00715.74
7.1.120.0060.00815.77
7.1.110.0050.00815.79
7.1.100.0060.00816.54
7.1.90.0080.00415.66
7.1.80.0070.00715.80
7.1.70.0040.00916.22
7.1.60.0070.01022.16
7.1.50.0100.00922.19
7.1.40.0100.00821.29
7.1.30.0130.00721.37
7.1.20.0130.00521.34
7.1.10.0090.00616.00
7.1.00.0060.00716.07
7.0.330.0100.00115.39
7.0.320.0030.00615.46
7.0.310.0080.00415.60
7.0.300.0030.01015.50
7.0.290.0050.00615.32
7.0.280.0050.00815.39
7.0.270.0070.00515.33
7.0.260.0060.00815.46
7.0.250.0040.00915.17
7.0.240.0050.00715.44
7.0.230.0050.00915.44
7.0.220.0080.00515.54
7.0.210.0040.00815.38
7.0.200.0070.00815.89
7.0.190.0080.00615.83
7.0.180.0100.00715.11
7.0.170.0060.01015.17
7.0.160.0070.00915.75
7.0.150.0040.01015.67
7.0.140.0050.00815.71
7.0.130.0080.00515.73
7.0.120.0050.00815.83
7.0.110.0030.00915.72
7.0.100.0020.01115.80
7.0.90.0080.00615.63
7.0.80.0030.00915.58
7.0.70.0040.01215.69
7.0.60.0080.00615.67
7.0.50.0010.01115.74
7.0.40.0050.00914.42
7.0.30.0050.00814.25
7.0.20.0070.00514.57
7.0.10.0070.00714.59
7.0.00.0050.00714.38
5.6.380.0070.00714.32

preferences:
38.75 ms | 400 KiB | 5 Q