3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); class MyDOM extends DOMDocument { /** * @param \DOMNode|\DOMNodeList|NULL $context * @param int $options * @return string */ public function saveXML($context = NULL, $options = 0) { if ($context instanceof DOMNodeList) { $result = ''; foreach ($context as $node) { $result .= parent::saveXML($node, $options); } return $result; } return parent::saveXML($context, $options); } } $dom = new MyDOM();

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.130.0060.00318.32
8.3.120.0060.00318.65
8.3.110.0060.00320.94
8.3.100.0060.00316.41
8.3.90.0120.00326.77
8.3.80.0120.00016.50
8.3.70.0030.01316.63
8.3.60.0030.01718.68
8.3.50.0080.00822.83
8.3.40.0110.00418.67
8.3.30.0140.00019.15
8.3.20.0070.00020.34
8.3.10.0080.00023.52
8.3.00.0080.00019.13
8.2.250.0060.00318.50
8.2.240.0090.00916.63
8.2.230.0030.00522.58
8.2.220.0030.00624.06
8.2.210.0070.01126.77
8.2.200.0040.00816.38
8.2.190.0110.01116.75
8.2.180.0130.00316.50
8.2.170.0070.00722.96
8.2.160.0140.00020.38
8.2.150.0060.00924.18
8.2.140.0070.00024.66
8.2.130.0120.00626.16
8.2.120.0000.00721.09
8.2.110.0030.00621.08
8.2.100.0120.00017.79
8.2.90.0000.00817.71
8.2.80.0030.00617.97
8.2.70.0040.00417.37
8.2.60.0000.00917.91
8.2.50.0030.00518.10
8.2.40.0050.00519.82
8.2.30.0040.00418.05
8.2.20.0040.00417.67
8.2.10.0000.00718.07
8.2.00.0080.00017.47
8.1.300.0070.00316.44
8.1.290.0040.00430.84
8.1.280.0140.00325.92
8.1.270.0000.00923.71
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.19
8.1.230.0070.00421.04
8.1.220.0050.00317.74
8.1.210.0040.00419.89
8.1.200.0090.00017.25
8.1.190.0030.00617.23
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0000.00721.96
8.1.150.0040.00418.75
8.1.140.0050.00217.48
8.1.130.0030.00517.89
8.1.120.0000.00717.49
8.1.110.0050.00217.45
8.1.100.0040.00417.41
8.1.90.0030.00717.43
8.1.80.0030.00317.36
8.1.70.0030.00517.41
8.1.60.0000.00817.50
8.1.50.0000.00817.46
8.1.40.0050.00217.47
8.1.30.0040.00417.64
8.1.20.0040.00417.55
8.1.10.0040.00417.59
8.1.00.0030.00517.49
8.0.300.0040.00420.20
8.0.290.0000.00816.63
8.0.280.0040.00418.34
8.0.270.0000.00716.68
8.0.260.0000.00817.14
8.0.250.0030.00316.96
8.0.240.0080.00016.91
8.0.230.0050.00216.85
8.0.220.0030.00316.84
8.0.210.0000.00816.84
8.0.200.0030.00316.85
8.0.190.0000.00716.86
8.0.180.0040.00416.84
8.0.170.0080.00016.72
8.0.160.0040.00416.79
8.0.150.0070.00016.78
8.0.140.0030.00316.80
8.0.130.0050.00013.26
8.0.120.0060.00316.75
8.0.110.0040.00416.80
8.0.100.0040.00416.93
8.0.90.0020.00516.88
8.0.80.0090.00716.97
8.0.70.0000.00816.70
8.0.60.0070.00016.87
8.0.50.0020.00516.69
8.0.30.0100.01217.08
8.0.20.0090.00917.40
8.0.10.0000.00716.98
8.0.00.0090.00816.63
7.4.330.0020.00215.07
7.4.320.0060.00016.52
7.4.300.0000.00616.42
7.4.290.0070.00016.52
7.4.280.0030.00316.35
7.4.270.0030.00316.61
7.4.260.0060.00316.43
7.4.250.0080.00016.45
7.4.240.0000.00716.42
7.4.230.0030.00316.60
7.4.220.0130.01016.61
7.4.210.0100.01016.53
7.4.200.0050.00316.69
7.4.160.0060.01216.52
7.4.150.0160.00317.40
7.4.140.0120.00517.86
7.4.130.0080.01116.37
7.4.120.0080.01216.51
7.4.110.0050.01416.52
7.4.100.0110.00816.45
7.4.90.0100.00716.33
7.4.80.0160.00619.39
7.4.70.0060.01016.34
7.4.60.0060.01016.32
7.4.50.0030.00516.24
7.4.40.0090.00616.09
7.4.30.0130.00316.53
7.4.00.0070.00715.07
7.3.330.0060.00013.07
7.3.320.0000.00513.10
7.3.310.0040.00416.22
7.3.300.0000.00616.17
7.3.290.0160.00316.19
7.3.280.0070.01016.27
7.3.270.0120.00917.40
7.3.260.0060.01216.25
7.3.250.0070.01016.42
7.3.240.0110.00716.13
7.3.230.0060.01216.39
7.3.210.0130.00316.19
7.3.200.0060.01116.35
7.3.190.0070.01016.61
7.3.180.0070.01416.31
7.3.170.0130.00316.31
7.3.160.0130.00316.21
7.2.330.0030.01416.40
7.2.320.0100.00716.25
7.2.310.0130.00916.62
7.2.300.0120.00416.57
7.2.290.0040.01116.57
7.2.80.0100.00316.43
7.2.60.0060.00616.65
7.1.200.0100.00615.54
7.1.70.0100.00217.03
7.1.60.0070.01319.40
7.1.50.0090.00616.94
7.1.00.0000.08022.36
7.0.200.0520.00614.57
7.0.140.0130.06722.15
7.0.60.0200.06019.98
7.0.50.0070.05717.96
7.0.40.0100.07320.11
7.0.30.0230.04720.21
7.0.20.0200.04320.24
7.0.10.0030.07020.21
7.0.00.0170.07320.06
5.6.280.0030.07321.02
5.6.210.0070.08020.63
5.6.200.0070.07318.16
5.6.190.0170.07720.65
5.6.180.0300.06320.61
5.6.170.0370.05020.48
5.6.160.0100.07720.45
5.6.150.0170.07018.22
5.6.140.0100.05018.18
5.6.130.0100.07318.15
5.6.120.0000.09021.07
5.6.110.0100.06721.05
5.6.100.0000.08021.02
5.6.90.0070.07321.02
5.6.80.0070.06720.40
5.5.350.0230.07320.30
5.5.340.0100.08017.99
5.5.330.0100.05720.32
5.5.320.0030.06320.34
5.5.310.0230.06320.34
5.5.300.0130.07317.97
5.5.290.0030.07317.95
5.5.280.0070.04720.68
5.5.270.0330.08320.86
5.5.260.0070.07020.81
5.5.250.0070.08020.60
5.5.240.0170.04720.21
5.4.450.0200.04319.20
5.4.440.0330.04719.64
5.4.430.0030.04319.55
5.4.420.0530.03719.16
5.4.410.0270.04719.28
5.4.400.0230.03719.20
5.4.390.0200.04019.04
5.4.380.0400.05018.75
5.4.370.0300.05318.70
5.4.360.0430.03718.48
5.4.350.0330.05018.75
5.4.340.0300.06318.76
5.4.320.0060.04112.53
5.4.310.0040.03912.53
5.4.300.0040.03812.53
5.4.290.0030.04112.52
5.4.280.0070.03612.42
5.4.270.0050.03712.42
5.4.260.0050.03912.42
5.4.250.0040.03912.42
5.4.240.0060.03612.42
5.4.230.0070.03612.41
5.4.220.0050.03612.41
5.4.210.0060.03512.41
5.4.200.0040.04012.41
5.4.190.0070.03512.41
5.4.180.0070.03412.41
5.4.170.0060.03612.42
5.4.160.0110.03112.42
5.4.150.0060.03612.41
5.4.140.0040.03912.10
5.4.130.0050.03712.08
5.4.120.0090.03312.04
5.4.110.0040.03712.04
5.4.100.0080.04612.04
5.4.90.0070.04312.04
5.4.80.0070.03512.04
5.4.70.0080.03412.04
5.4.60.0050.03412.04
5.4.50.0050.03512.04
5.4.40.0050.03512.02
5.4.30.0110.02812.02
5.4.20.0040.03412.02
5.4.10.0070.03712.02
5.4.00.0050.03511.51
5.3.290.0050.04412.80
5.3.280.0070.03612.71
5.3.270.0010.04212.73
5.3.260.0070.03612.72
5.3.250.0030.03812.72
5.3.240.0040.03712.72
5.3.230.0050.03712.71
5.3.220.0070.03512.68
5.3.210.0050.03912.68
5.3.200.0080.03312.68
5.3.190.0040.03912.68
5.3.180.0050.03512.67
5.3.170.0070.04012.67
5.3.160.0040.03712.68
5.3.150.0100.03812.67
5.3.140.0040.03612.67
5.3.130.0070.04512.66
5.3.120.0020.04112.66
5.3.110.0050.03812.66
5.3.100.0070.03912.14
5.3.90.0050.04112.13
5.3.80.0090.03812.13
5.3.70.0070.03612.12
5.3.60.0060.04012.11
5.3.50.0070.04412.05
5.3.40.0060.03512.05
5.3.30.0130.04212.01
5.3.20.0060.03411.79
5.3.10.0040.03511.75
5.3.00.0050.03611.74
5.2.170.0050.0309.25
5.2.160.0030.0299.25
5.2.150.0090.0259.25
5.2.140.0050.0289.24
5.2.130.0050.0289.20
5.2.120.0090.0299.21
5.2.110.0040.0329.21
5.2.100.0010.0339.20
5.2.90.0050.0289.20
5.2.80.0040.0319.20
5.2.70.0070.0289.20
5.2.60.0080.0269.16
5.2.50.0050.0299.12
5.2.40.0030.0369.10
5.2.30.0040.0309.07
5.2.20.0020.0319.06
5.2.10.0070.0258.97
5.2.00.0050.0298.83
5.1.60.0030.0258.12
5.1.50.0030.0258.11
5.1.40.0050.0228.09
5.1.30.0030.0268.44
5.1.20.0040.0338.46
5.1.10.0080.0268.19
5.1.00.0050.0258.19
5.0.50.0020.0306.67
5.0.40.0030.0266.52
5.0.30.0030.0336.34
5.0.20.0040.0256.30
5.0.10.0050.0176.29
5.0.00.0030.0376.28
4.4.90.0030.0144.78
4.4.80.0030.0144.75
4.4.70.0020.0154.75
4.4.60.0030.0144.75
4.4.50.0030.0144.77
4.4.40.0010.0264.71
4.4.30.0030.0154.76
4.4.20.0040.0134.84
4.4.10.0070.0204.85
4.4.00.0030.0244.76
4.3.110.0020.0164.67
4.3.100.0040.0184.67
4.3.90.0030.0134.63
4.3.80.0020.0254.59
4.3.70.0060.0214.63
4.3.60.0000.0164.63
4.3.50.0030.0254.63
4.3.40.0020.0244.54
4.3.30.0030.0173.30
4.3.20.0020.0163.28
4.3.10.0020.0153.24
4.3.00.0030.01713.25

preferences:
27.54 ms | 403 KiB | 5 Q