3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<html><body><div>123</div><div>456</div></body></html>'; $dom = new DOMDocument; $dom->preserveWhiteSpace = true; $dom->formatOutput = false; $dom->loadHTML($html, LIBXML_HTML_NODEFDTD); $body = $dom->getElementsByTagName('body')->item(0); echo $dom->saveHTML($body);

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.20.0130.00320.49
8.4.10.0030.00617.91
8.3.150.0150.00319.07
8.3.140.0040.00417.54
8.3.130.0140.00018.38
8.3.120.0040.00418.90
8.3.110.0140.00720.94
8.3.100.0030.00724.06
8.3.90.0050.00326.77
8.3.80.0090.00016.75
8.3.70.0130.00316.58
8.3.60.0090.00618.45
8.3.50.0120.00718.46
8.3.40.0060.00918.84
8.3.30.0110.00620.94
8.3.20.0100.00521.57
8.3.10.0070.00622.49
8.3.00.0050.00722.00
8.2.270.0060.01217.46
8.2.260.0110.00716.62
8.2.250.0040.00418.44
8.2.240.0130.00319.59
8.2.230.0090.00622.58
8.2.220.0080.00037.54
8.2.210.0080.01126.77
8.2.200.0060.00318.67
8.2.190.0150.00617.00
8.2.180.0170.00316.75
8.2.170.0070.00722.96
8.2.160.0050.01022.66
8.2.150.0110.00023.57
8.2.140.0070.00723.81
8.2.130.0070.00722.64
8.2.120.0100.00424.66
8.2.110.0050.00722.65
8.2.100.0030.01020.50
8.2.90.0070.00820.56
8.2.80.0040.00720.57
8.2.70.0110.00320.57
8.2.60.0060.00520.65
8.2.50.0100.00320.53
8.2.40.0060.00622.13
8.2.30.0040.00721.17
8.2.20.0050.00520.74
8.2.10.0050.00520.58
8.2.00.0090.00220.76
8.1.310.0000.00718.58
8.1.300.0000.00816.70
8.1.290.0050.00530.84
8.1.280.0120.00325.92
8.1.270.0060.00523.29
8.1.260.0040.00925.18
8.1.250.0060.00926.18
8.1.240.0050.01220.28
8.1.230.0080.00822.08
8.1.220.0060.00720.49
8.1.210.0060.00620.88
8.1.200.0050.00720.22
8.1.190.0100.00420.16
8.1.180.0080.00520.53
8.1.170.0000.01220.89
8.1.160.0070.00421.03
8.1.150.0080.00320.99
8.1.140.0070.00422.68
8.1.130.0040.00721.19
8.1.120.0040.00720.31
8.1.110.0090.00220.26
8.1.100.0060.00620.33
8.1.90.0020.00920.27
8.1.80.0050.00520.26
8.1.70.0040.00720.24
8.1.60.0030.00820.35
8.1.50.0100.00320.28
8.1.40.0100.00320.36
8.1.30.0050.00720.42
8.1.20.0040.00720.37
8.1.10.0050.00720.36
8.1.00.0070.00520.29
8.0.300.0070.00521.42
8.0.290.0150.00419.98
8.0.280.0150.00420.82
8.0.270.0080.00620.23
8.0.260.0090.00920.01
8.0.250.0130.00720.05
8.0.240.0120.00820.09
8.0.230.0140.00219.99
8.0.220.0100.00519.99
8.0.210.0210.00019.98
8.0.200.0090.00820.03
8.0.190.0070.00420.06
8.0.180.0080.00620.01
8.0.170.0160.00320.00
8.0.160.0100.00520.01
8.0.150.0090.00819.96
8.0.140.0120.00419.95
8.0.130.0070.00818.23
8.0.120.0130.00319.98
8.0.110.0130.00320.01
8.0.100.0120.00320.03
8.0.90.0100.00620.00
8.0.80.0120.00719.02
8.0.70.0050.00819.89
8.0.60.0140.00519.93
8.0.50.0120.00720.04
8.0.30.0150.00718.64
8.0.20.0110.01318.70
8.0.10.0220.01020.07
8.0.00.0160.00818.54
7.4.330.0080.00119.26
7.4.320.0160.00519.90
7.4.300.0160.00319.85
7.4.290.0130.00619.80
7.4.280.0170.00519.85
7.4.270.0210.00319.79
7.4.260.0190.00519.85
7.4.250.0150.00919.77
7.4.240.0190.00219.83
7.4.230.0170.00219.80
7.4.220.0150.00319.91
7.4.210.0120.00718.78
7.4.200.0160.00419.72
7.4.190.0250.00422.96
7.4.180.0180.01822.96
7.4.160.0160.00718.21
7.4.150.0280.00319.87
7.4.140.0150.00918.39
7.4.130.0230.00918.81
7.4.120.0140.00817.52
7.4.110.0190.01318.71
7.4.100.0200.00818.80
7.4.90.0230.00918.68
7.4.80.0230.00719.70
7.4.70.0210.00918.69
7.4.60.0240.00418.68
7.4.50.0200.00718.75
7.4.40.0180.01018.73
7.4.30.0250.00719.74
7.4.20.0270.00519.90
7.4.10.0300.00319.69
7.4.00.0170.01018.14
7.3.330.0120.00718.14
7.3.320.0150.00418.10
7.3.310.0150.00419.70
7.3.300.0080.01019.64
7.3.290.0110.00719.72
7.3.280.0150.00518.61
7.3.270.0280.00419.89
7.3.260.0160.00817.67
7.3.250.0230.01019.82
7.3.240.0160.00817.60
7.3.230.0200.00918.79
7.3.220.0220.00719.64
7.3.210.0180.00918.66
7.3.200.0210.00518.70
7.3.190.0160.01318.73
7.3.180.0210.00518.63
7.3.170.0230.00718.62
7.3.160.0160.01118.72
7.3.150.0230.00819.85
7.3.140.0260.01019.70
7.3.130.0320.00219.75
7.3.120.0180.01019.69
7.3.110.0220.00618.10
7.3.100.0180.01118.13
7.3.90.0170.01018.03
7.3.80.0250.00618.06
7.3.70.0210.00418.16
7.3.60.0210.01018.12
7.3.50.0210.00818.13
7.3.40.0240.00818.01
7.3.30.0210.00518.03
7.3.20.0190.01018.12
7.3.10.0150.00817.63
7.3.00.0130.00717.78
7.2.340.0240.00519.79
7.2.330.0160.01218.92
7.2.320.0180.01119.00
7.2.310.0220.00318.88
7.2.300.0220.00818.87
7.2.290.0180.00718.84
7.2.280.0180.01319.92
7.2.270.0250.00819.68
7.2.260.0180.01019.81
7.2.250.0220.00919.97
7.2.240.0180.01218.29
7.2.230.0230.00918.29
7.2.220.0160.01018.10
7.2.210.0260.00218.39
7.2.200.0240.00618.27
7.2.190.0240.00818.16
7.2.180.0200.01218.25
7.2.170.0200.00818.16
7.2.160.0150.01018.22
7.2.150.0220.00918.27
7.2.140.0260.00418.31
7.2.130.0160.00517.87
7.2.120.0390.00716.53
7.2.110.0470.00716.49
7.2.100.0350.00816.55
7.2.90.0520.00716.51
7.2.80.0390.00916.51
7.2.70.0560.01116.70
7.2.60.0560.00916.68
7.2.50.0450.00716.65
7.2.40.0610.00916.70
7.2.30.0420.00716.69
7.2.20.0490.00816.73
7.2.10.0500.01016.75
7.2.00.0350.01016.63
7.1.330.0190.00917.54
7.1.320.0150.01117.48
7.1.310.0210.00717.32
7.1.300.0250.00517.54
7.1.290.0160.00917.45
7.1.280.0160.01017.51
7.1.270.0160.00817.55
7.1.260.0210.00417.56
7.1.250.0150.00817.03
7.1.240.0470.00815.65
7.1.230.0650.00915.68
7.1.220.0510.00715.70
7.1.210.0590.00715.71
7.1.200.0500.00615.72
7.1.190.0670.00715.75
7.1.180.0700.00615.74
7.1.170.0700.00715.71
7.1.160.0450.00815.68
7.1.150.0330.00915.60
7.1.140.0700.00615.67
7.1.130.0440.00615.60
7.1.120.0700.00515.61
7.1.110.0660.00515.69
7.1.100.0420.00915.65
7.1.90.0730.00415.69
7.1.80.0490.00515.71
7.1.70.0580.00815.59
7.1.60.0450.00615.65
7.1.50.0400.00715.64
7.1.40.0620.00615.67
7.1.30.0690.00615.68
7.1.20.0460.00715.67
7.1.10.0440.00915.66
7.1.00.0450.00615.77
7.0.330.0190.00417.27
7.0.320.0420.00915.41
7.0.310.0170.00917.24
7.0.300.0140.00817.34
7.0.290.0170.01017.43
7.0.280.0190.00617.34
7.0.270.0220.00517.35
7.0.260.0180.00717.35
7.0.250.0260.00817.32
7.0.240.0250.00417.34
7.0.230.0160.01017.29
7.0.220.0210.00617.33
7.0.210.0150.01017.41
7.0.200.0170.00917.33
7.0.190.0210.00817.29
7.0.180.0170.01117.37
7.0.170.0170.01017.37
7.0.160.0170.00717.37
7.0.150.0170.00417.33
7.0.140.0180.00817.25
7.0.130.0160.00817.40
7.0.120.0200.00617.39
7.0.110.0130.01117.28
7.0.100.0150.00717.36
7.0.90.0120.01017.30
7.0.80.0210.00917.34
7.0.70.0150.00717.45
7.0.60.0140.00917.36
7.0.50.0160.00617.36
7.0.40.0140.00917.34
7.0.30.0180.00717.33
7.0.20.0130.01317.33
7.0.10.0160.00517.24
7.0.00.0130.00917.27
5.6.400.0170.00717.80
5.6.390.0210.00617.99
5.6.380.0130.00816.13
5.6.370.0160.00917.95
5.6.360.0130.01117.80
5.6.350.0170.00717.66
5.6.340.0160.00917.88
5.6.330.0220.00717.78
5.6.320.0210.00917.79
5.6.310.0210.00817.98
5.6.300.0170.00917.86
5.6.290.0170.00917.72
5.6.280.0180.00717.81
5.6.270.0140.01017.76
5.6.260.0150.00717.82
5.6.250.0150.00717.78
5.6.240.0180.00517.79
5.6.230.0190.01017.80
5.6.220.0140.01017.70
5.6.210.0130.01217.71
5.6.200.0180.00717.91
5.6.190.0120.01017.77
5.6.180.0190.00617.72
5.6.170.0160.00817.82
5.6.160.0140.01017.70
5.6.150.0170.01117.80
5.6.140.0170.00917.78
5.6.130.0210.00417.85
5.6.120.0200.00417.82
5.6.110.0150.01117.73
5.6.100.0190.00517.77
5.6.90.0130.01117.75
5.6.80.0210.00917.76
5.6.70.0190.00717.80
5.6.60.0180.00717.80
5.6.50.0180.00517.83
5.6.40.0150.00717.83
5.6.30.0160.00717.76
5.6.20.0200.00517.84
5.6.10.0200.00617.66
5.6.00.0150.00917.71

preferences:
31.03 ms | 403 KiB | 5 Q