3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <child name='Child3' /> </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( '//child') as $child) { $attributes = $child->attributes(); echo $attributes['name'] . "\n"; }

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.0090.01318.91
8.3.50.0100.01022.15
8.3.40.0150.00319.25
8.3.30.0140.00019.45
8.3.20.0070.00020.75
8.3.10.0050.00323.90
8.3.00.0060.00319.63
8.2.180.0140.00317.00
8.2.170.0040.01122.96
8.2.160.0100.00320.90
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0000.00822.64
8.2.110.0070.00322.61
8.2.100.0030.00918.13
8.2.90.0050.00319.55
8.2.80.0030.00618.00
8.2.70.0040.00417.88
8.2.60.0000.00818.30
8.2.50.0040.00418.07
8.2.40.0040.00418.66
8.2.30.0000.00818.47
8.2.20.0080.00018.16
8.2.10.0040.00418.65
8.2.00.0050.00318.08
8.1.280.0030.01725.92
8.1.270.0040.00422.39
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0040.00424.22
8.1.230.0040.00819.54
8.1.220.0040.00418.16
8.1.210.0000.00918.77
8.1.200.0000.01017.75
8.1.190.0080.00017.72
8.1.180.0030.00518.10
8.1.170.0050.00320.80
8.1.160.0040.00422.43
8.1.150.0000.00719.40
8.1.140.0050.00317.87
8.1.130.0030.00318.18
8.1.120.0040.00417.90
8.1.110.0000.00817.93
8.1.100.0020.00517.71
8.1.90.0000.00717.77
8.1.80.0000.00817.90
8.1.70.0070.00017.86
8.1.60.0030.00618.00
8.1.50.0060.00317.86
8.1.40.0000.00817.68
8.1.30.0090.00018.07
8.1.20.0040.00418.12
8.1.10.0030.00517.94
8.1.00.0030.00517.84
8.0.300.0040.00418.77
8.0.290.0070.00017.13
8.0.280.0000.00718.96
8.0.270.0000.00717.57
8.0.260.0000.00617.72
8.0.250.0030.00317.22
8.0.240.0000.00817.31
8.0.230.0070.00017.36
8.0.220.0000.00717.25
8.0.210.0030.00317.20
8.0.200.0030.00317.27
8.0.190.0000.00717.37
8.0.180.0050.00217.28
8.0.170.0000.00717.38
8.0.160.0000.00817.37
8.0.150.0030.00317.05
8.0.140.0040.00417.30
8.0.130.0050.00013.66
8.0.120.0000.00817.20
8.0.110.0000.00717.32
8.0.100.0040.00417.20
8.0.90.0040.00417.29
8.0.80.0060.00917.35
8.0.70.0050.00217.28
8.0.60.0000.00717.25
8.0.50.0000.00717.35
8.0.30.0090.01317.56
8.0.20.0090.01317.43
8.0.10.0030.00617.21
8.0.00.0100.00717.00
7.4.330.0070.00015.02
7.4.320.0060.00016.97
7.4.300.0030.00316.84
7.4.290.0030.00317.08
7.4.280.0040.00416.93
7.4.270.0020.00516.82
7.4.260.0000.00716.72
7.4.250.0020.00516.79
7.4.240.0020.00517.03
7.4.230.0050.00217.04
7.4.220.0120.00616.95
7.4.210.0120.00317.03
7.4.200.0050.00216.88
7.4.160.0070.01016.73
7.4.150.0150.00617.40
7.4.140.0090.01217.86
7.4.130.0070.01316.90
7.4.120.0070.01016.74
7.4.110.0100.01016.97
7.4.100.0070.01016.96
7.4.90.0040.01516.96
7.4.80.0120.00619.39
7.4.70.0130.00917.01
7.4.60.0030.01316.82
7.4.50.0030.00617.05
7.4.40.0120.00617.04
7.4.30.0080.00816.85
7.4.00.0100.00315.14
7.3.330.0040.00313.41
7.3.320.0000.00513.58
7.3.310.0000.00716.79
7.3.300.0000.00716.58
7.3.290.0050.00916.62
7.3.280.0080.00816.60
7.3.270.0060.01617.40
7.3.260.0150.00316.60
7.3.250.0100.00716.76
7.3.240.0070.01016.69
7.3.230.0120.00616.75
7.3.210.0130.00316.75
7.3.200.0110.01119.39
7.3.190.0090.00917.05
7.3.180.0090.00916.50
7.3.170.0110.00716.68
7.3.160.0130.01016.71
7.2.330.0150.00816.95
7.2.320.0220.00017.22
7.2.310.0120.00616.94
7.2.300.0140.00316.89
7.2.290.0070.01517.18
7.2.60.0100.00317.19
7.1.200.0000.00915.84
7.1.70.0040.00417.36
7.1.60.0080.00417.10
7.1.50.0070.01717.11
7.1.00.0030.07722.59
7.0.200.0060.00916.79
7.0.140.0070.07022.25
7.0.60.0100.07720.23
7.0.50.0100.04018.03
7.0.40.0130.05320.25
7.0.30.0170.05020.25
7.0.20.0200.05020.29
7.0.10.0270.05720.25
7.0.00.0100.05320.44
5.6.280.0030.07321.11
5.6.210.0100.07720.64
5.6.200.0100.07018.38
5.6.190.0130.08720.89
5.6.180.0400.06320.55
5.6.170.0270.06320.58
5.6.160.0030.04320.66
5.6.150.0030.05318.37
5.6.140.0000.04318.36
5.6.130.0070.08718.27
5.6.120.0170.07321.14
5.6.110.0070.08721.23
5.6.100.0100.08321.14
5.6.90.0130.07721.23
5.6.80.0070.08020.67
5.6.70.3670.04020.63
5.5.350.0070.08320.54
5.5.340.0030.06318.21
5.5.330.0100.08020.38
5.5.320.0400.08020.38
5.5.310.0330.05720.50
5.5.300.0170.03718.11
5.5.290.0100.08018.11
5.5.280.0070.06720.91
5.5.270.0070.04020.97
5.5.260.0100.08020.94
5.5.250.0070.04720.72
5.5.240.0330.07020.38
5.4.450.0170.06719.84
5.4.440.0170.06019.79
5.4.430.0800.05019.68
5.4.420.0730.05319.73
5.4.410.0770.05719.57
5.4.400.0870.04319.28
5.4.390.0770.06719.25
5.4.380.0300.07019.37
5.4.370.0530.06719.29
5.4.360.0570.05019.50
5.4.350.1200.07019.05
5.4.340.0060.03512.21
5.4.320.0050.03812.70
5.4.310.0060.03912.69
5.4.300.0070.03712.70
5.4.290.0050.04312.70
5.4.280.0070.03612.60
5.4.270.0070.03512.59
5.4.260.0050.03912.60
5.4.250.0030.04212.60
5.4.240.0050.03712.59
5.4.230.0050.04212.59
5.4.220.0050.03712.59
5.4.210.0040.03712.59
5.4.200.0030.04012.59
5.4.190.0060.03612.59
5.4.180.0050.03712.59
5.4.170.0090.03212.60
5.4.160.0050.03612.59
5.4.150.0030.04012.59
5.4.140.0080.03712.27
5.4.130.0100.03012.26
5.4.120.0070.03412.21
5.4.110.0040.04112.21
5.4.100.0090.03212.22
5.4.90.0040.03912.21
5.4.80.0080.03512.21
5.4.70.0080.03312.21
5.4.60.0070.03412.21
5.4.50.0080.03412.20
5.4.40.0080.03512.19
5.4.30.0070.03512.19
5.4.20.0060.03512.18
5.4.10.0050.03512.19
5.4.00.0080.03411.68
5.3.290.0070.03912.96
5.3.280.0110.04012.89
5.3.270.0120.05612.90
5.3.260.0110.04212.91
5.3.250.0070.04612.91
5.3.240.0030.04012.91
5.3.230.0050.03912.90
5.3.220.0040.03912.87
5.3.210.0040.04112.87
5.3.200.0040.03812.87
5.3.190.0050.03912.87
5.3.180.0040.03912.87
5.3.170.0060.03812.86
5.3.160.0020.04212.87
5.3.150.0080.03812.87
5.3.140.0040.04012.86
5.3.130.0050.04212.85
5.3.120.0070.03812.85
5.3.110.0060.04112.85
5.3.100.0080.04512.34
5.3.90.0080.05112.32
5.3.80.0090.04712.30
5.3.70.0070.04312.30
5.3.60.0060.04112.29
5.3.50.0100.04612.23
5.3.40.0060.04012.23
5.3.30.0070.03412.20
5.3.20.0070.03411.97
5.3.10.0030.03811.94
5.3.00.0070.03511.93
5.2.170.0030.0349.43
5.2.160.0060.0329.43
5.2.150.0070.0299.43
5.2.140.0050.0369.43
5.2.130.0040.0319.39
5.2.120.0040.0299.39
5.2.110.0050.0299.40
5.2.100.0040.0299.39
5.2.90.0040.0309.39
5.2.80.0030.0329.38
5.2.70.0090.0279.38
5.2.60.0050.0319.34
5.2.50.0040.0339.30
5.2.40.0070.0389.29
5.2.30.0060.0299.25
5.2.20.0050.0289.25
5.2.10.0050.0329.17
5.2.00.0050.0359.03
5.1.60.0020.0278.32
5.1.50.0050.0248.32
5.1.40.0040.0258.29
5.1.30.0050.0278.64
5.1.20.0020.0318.66
5.1.10.0060.0288.39
5.1.00.0070.0258.38
5.0.50.0030.0216.85
5.0.40.0060.0176.71
5.0.30.0030.0326.54
5.0.20.0020.0216.50
5.0.10.0040.0206.48
5.0.00.0040.0316.47
4.4.90.0050.0144.78
4.4.80.0020.0174.75
4.4.70.0060.0174.75
4.4.60.0020.0194.76
4.4.50.0040.0154.77
4.4.40.0020.0344.71
4.4.30.0060.0174.76
4.4.20.0050.0204.85
4.4.10.0050.0204.85
4.4.00.0060.0304.76
4.3.110.0010.0174.67
4.3.100.0010.0164.66
4.3.90.0030.0144.63
4.3.80.0040.0234.58
4.3.70.0010.0174.63
4.3.60.0030.0144.63
4.3.50.0030.0164.63
4.3.40.0020.0254.54
4.3.30.0040.0153.28
4.3.20.0040.0143.26
4.3.10.0030.0163.22
4.3.00.0000.0236.99

preferences:
35.84 ms | 401 KiB | 5 Q