3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<items><item/><item/><item/><foo:bar xmlns:foo="urn:foo"/></items>'; $dom = new DOMDocument(); $dom->loadXml($xml); $array = iterator_to_array($dom->documentElement->childNodes); var_dump(count($array), array_keys($array));

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.0120.00616.88
8.3.50.0100.01018.20
8.3.40.0110.00718.96
8.3.30.0060.00919.30
8.3.20.0040.00420.50
8.3.10.0060.00322.10
8.3.00.0030.00619.50
8.2.180.0090.00618.73
8.2.170.0040.01122.96
8.2.160.0100.00320.74
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00722.38
8.2.110.0070.00422.50
8.2.100.0090.00318.09
8.2.90.0030.00518.02
8.2.80.0040.00817.97
8.2.70.0080.00017.50
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0080.00020.20
8.2.30.0030.00619.97
8.2.20.0050.00317.91
8.2.10.0000.00719.97
8.2.00.0000.01217.84
8.1.270.0000.00824.20
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00322.68
8.1.230.0090.00321.16
8.1.220.0080.00017.90
8.1.210.0060.00319.21
8.1.200.0030.00617.48
8.1.190.0050.00317.48
8.1.180.0090.00018.10
8.1.170.0050.00318.82
8.1.160.0070.00022.19
8.1.150.0030.00618.86
8.1.140.0040.00417.67
8.1.130.0000.00718.02
8.1.120.0030.00317.76
8.1.110.0040.00417.54
8.1.100.0020.00517.62
8.1.90.0040.00417.75
8.1.80.0040.00417.60
8.1.70.0000.00717.54
8.1.60.0030.00617.71
8.1.50.0050.00317.79
8.1.40.0030.00517.77
8.1.30.0090.00017.79
8.1.20.0030.00517.79
8.1.10.0080.00017.67
8.1.00.0030.00517.72
8.0.300.0080.00020.03
8.0.290.0070.00016.88
8.0.280.0030.00318.58
8.0.270.0000.00717.40
8.0.260.0000.00717.39
8.0.250.0030.00317.06
8.0.240.0050.00317.17
8.0.230.0030.00317.13
8.0.220.0000.00717.06
8.0.210.0030.00516.91
8.0.200.0000.00617.09
8.0.190.0040.00417.16
8.0.180.0050.00316.93
8.0.170.0040.00417.10
8.0.160.0050.00217.07
8.0.150.0040.00417.16
8.0.140.0000.00716.93
8.0.130.0040.00413.50
8.0.120.0040.00417.09
8.0.110.0040.00417.13
8.0.100.0080.00016.98
8.0.90.0040.00416.96
8.0.80.0070.01117.12
8.0.70.0080.00016.93
8.0.60.0000.00717.05
8.0.50.0000.00717.18
8.0.30.0110.01017.45
8.0.20.0090.00917.45
8.0.10.0050.00317.28
8.0.00.0060.01316.90
7.4.330.0000.00515.26
7.4.320.0000.00616.86
7.4.300.0060.00016.78
7.4.290.0040.00416.78
7.4.280.0030.00616.70
7.4.270.0000.00716.73
7.4.260.0000.00816.58
7.4.250.0000.00816.68
7.4.240.0050.00216.71
7.4.230.0070.00016.64
7.4.220.0080.00816.60
7.4.210.0080.00816.76
7.4.200.0070.00016.52
7.4.190.0050.00216.96
7.4.160.0100.00716.61
7.4.150.0030.01717.40
7.4.140.0090.01117.86
7.4.130.0110.00816.82
7.4.120.0060.01016.74
7.4.110.0030.01316.47
7.4.100.0140.00616.77
7.4.90.0120.00416.72
7.4.80.0050.01219.39
7.4.70.0070.01016.54
7.4.60.0040.01116.51
7.4.50.0040.00416.64
7.4.40.0040.01122.77
7.4.30.0040.01116.50
7.4.00.0060.00615.00
7.3.330.0050.00013.33
7.3.320.0050.00013.24
7.3.310.0000.00716.41
7.3.300.0070.00016.27
7.3.290.0160.00316.43
7.3.280.0120.00616.39
7.3.270.0090.00917.40
7.3.260.0110.01116.76
7.3.250.0140.00916.59
7.3.240.0110.00516.44
7.3.230.0050.01416.50
7.3.210.0110.00616.39
7.3.200.0120.00619.39
7.3.190.0150.00816.55
7.3.180.0090.00616.68
7.3.170.0090.00716.38
7.3.160.0100.00716.46
7.3.120.0090.00614.79
7.2.330.0130.00716.79
7.2.320.0100.00716.93
7.2.310.0070.01016.95
7.2.300.0120.00916.59
7.2.290.0090.01216.90
7.2.00.0000.01319.62
7.1.100.0000.01017.89
7.1.70.0030.00517.36
7.1.60.0090.01619.46
7.1.50.0000.01216.82
7.1.00.0000.08022.58
7.0.200.0030.00616.61
7.0.140.0000.07722.13
7.0.60.0130.08020.11
7.0.50.0070.08017.85
7.0.40.0030.04720.38
7.0.30.0400.06720.46
7.0.20.0270.05020.11
7.0.10.0300.07720.40
7.0.00.0130.08320.39
5.6.280.0030.09021.18
5.6.210.0100.07720.91
5.6.200.0070.05318.24
5.6.190.0030.04320.64
5.6.180.0200.07720.77
5.6.170.0170.04720.44
5.6.160.0100.03720.59
5.6.150.0100.06018.30
5.6.140.0100.08018.25
5.6.130.0070.05718.34
5.6.120.0130.04021.02
5.6.110.0030.04021.02
5.6.100.0070.04321.18
5.6.90.0030.08321.02
5.6.80.0100.03720.59
5.6.70.4300.04720.39
5.5.350.0030.08020.42
5.5.340.0130.07318.02
5.5.330.0070.04320.43
5.5.320.0470.06020.49
5.5.310.0270.07720.22
5.5.300.0030.04718.02
5.5.290.0070.08318.02
5.5.280.0100.08321.05
5.5.270.0130.08020.80
5.5.260.0100.08020.71
5.5.250.0170.02720.73
5.5.240.0070.07320.39
5.4.450.0770.06319.70
5.4.440.1000.05719.64
5.4.430.0600.06019.69
5.4.420.0130.05319.47
5.4.410.0730.06319.57
5.4.400.0770.04319.00
5.4.390.0230.05319.13
5.4.380.0500.05318.80
5.4.370.0470.04318.70
5.4.360.0300.05718.81
5.4.350.0330.05718.79
5.4.340.0370.05018.78
5.4.320.0060.03612.61
5.4.310.0070.04012.61
5.4.300.0080.03712.61
5.4.290.0120.05512.59
5.4.280.0130.05812.49
5.4.270.0130.06012.49
5.4.260.0120.05812.49
5.4.250.0080.05412.50
5.4.240.0090.04312.49
5.4.230.0090.04912.48
5.4.220.0050.04912.49
5.4.210.0110.04112.49
5.4.200.0090.04712.49
5.4.190.0180.06612.48
5.4.180.0110.06712.48
5.4.170.0070.04912.49
5.4.160.0100.05112.49
5.4.150.0090.05012.49
5.4.140.0080.06712.17
5.4.130.0090.04812.16
5.4.120.0070.05412.12
5.4.110.0090.04112.11
5.4.100.0100.05112.11
5.4.90.0100.06312.11
5.4.80.0110.05312.11
5.4.70.0140.04912.11
5.4.60.0140.06112.11
5.4.50.0080.04012.11
5.4.40.0050.04312.10
5.4.30.0200.05412.10
5.4.20.0100.05212.10
5.4.10.0110.05112.10
5.4.00.0090.04911.59
5.3.290.0060.04412.86
5.3.280.0110.05612.80
5.3.270.0150.05312.80
5.3.260.0080.06112.81
5.3.250.0130.05912.81
5.3.240.0090.05512.81
5.3.230.0130.04512.80
5.3.220.0120.04612.77
5.3.210.0100.03912.77
5.3.200.0060.04312.77
5.3.190.0110.03712.77
5.3.180.0080.04712.77
5.3.170.0140.05312.77
5.3.160.0110.05012.77
5.3.150.0080.05312.77
5.3.140.0070.04212.76
5.3.130.0130.03812.75
5.3.120.0120.04412.76
5.3.110.0150.06212.76
5.3.100.0130.05412.24
5.3.90.0160.08612.22
5.3.80.0150.06312.21
5.3.70.0210.09212.22
5.3.60.0320.08312.20
5.3.50.0190.07912.14
5.3.40.0150.07712.14
5.3.30.0150.06812.10
5.3.20.0120.05411.89
5.3.10.0100.04811.86
5.3.00.0080.06911.84
5.2.170.0090.0419.34
5.2.160.0140.0519.34
5.2.150.0160.0589.34
5.2.140.0150.0609.34
5.2.130.0150.0689.30
5.2.120.0070.0499.30
5.2.110.0090.0369.30
5.2.100.0080.0479.30
5.2.90.0100.0449.30
5.2.80.0100.0529.29
5.2.70.0290.0859.30
5.2.60.0180.0859.24
5.2.50.0170.0629.21
5.2.40.0110.0589.20
5.2.30.0190.0799.17
5.2.20.0190.0769.16
5.2.10.0180.0749.08
5.2.00.0130.0538.94
5.1.60.0070.0338.23
5.1.50.0090.0368.22
5.1.40.0100.0508.20
5.1.30.0170.0358.55
5.1.20.0070.0478.56
5.1.10.0110.0488.30
5.1.00.0130.0548.29
5.0.50.0080.0546.77
5.0.40.0190.0506.64
5.0.30.0070.0706.45
5.0.20.0070.0286.42
5.0.10.0060.0286.39
5.0.00.0130.0636.39
4.4.90.0040.0264.78
4.4.80.0080.0404.75
4.4.70.0110.0374.76
4.4.60.0040.0194.76
4.4.50.0060.0214.77
4.4.40.0070.0414.71
4.4.30.0130.0614.76
4.4.20.0080.0214.84
4.4.10.0040.0384.85
4.4.00.0060.0484.76
4.3.110.0180.0564.67
4.3.100.0060.0254.67
4.3.90.0120.0504.63
4.3.80.0120.0564.58
4.3.70.0070.0214.63
4.3.60.0060.0224.62
4.3.50.0040.0254.63
4.3.40.0030.0364.54
4.3.30.0030.0243.28
4.3.20.0030.0213.26
4.3.10.0030.0233.22
4.3.00.0300.01710.55

preferences:
61.15 ms | 400 KiB | 5 Q