3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent name='subchild'> naiya </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( '//child[@name="Child2"]') 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.0100.01018.80
8.3.50.0090.01322.31
8.3.40.0110.00718.82
8.3.30.0110.01119.47
8.3.20.0080.00020.73
8.3.10.0000.00823.87
8.3.00.0090.00019.73
8.2.180.0120.00316.88
8.2.170.0060.00922.96
8.2.160.0030.01020.95
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00422.54
8.2.110.0060.00321.35
8.2.100.0060.00617.88
8.2.90.0000.00819.46
8.2.80.0000.00817.97
8.2.70.0040.00817.87
8.2.60.0090.00018.41
8.2.50.0000.00818.07
8.2.40.0040.00418.58
8.2.30.0000.00918.46
8.2.20.0000.00817.92
8.2.10.0050.00218.48
8.2.00.0050.00318.15
8.1.280.0100.00325.92
8.1.270.0030.00622.31
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00324.29
8.1.230.0100.00319.43
8.1.220.0000.00818.05
8.1.210.0050.00318.77
8.1.200.0090.00017.60
8.1.190.0050.00317.63
8.1.180.0040.00418.10
8.1.170.0040.00420.71
8.1.160.0070.00022.19
8.1.150.0040.00419.23
8.1.140.0000.00717.88
8.1.130.0040.00418.21
8.1.120.0000.00817.82
8.1.110.0080.00017.67
8.1.100.0070.00017.68
8.1.90.0050.00217.66
8.1.80.0030.00317.88
8.1.70.0030.00317.83
8.1.60.0000.00817.96
8.1.50.0030.00617.88
8.1.40.0080.00017.72
8.1.30.0040.00418.08
8.1.20.0040.00417.89
8.1.10.0040.00417.75
8.1.00.0040.00417.87
8.0.300.0040.00418.77
8.0.290.0000.00817.00
8.0.280.0040.00418.68
8.0.270.0000.00817.54
8.0.260.0030.00317.58
8.0.250.0070.00017.17
8.0.240.0070.00017.19
8.0.230.0000.00817.40
8.0.220.0030.00317.29
8.0.210.0000.00717.05
8.0.200.0030.00317.14
8.0.190.0050.00217.13
8.0.180.0040.00417.18
8.0.170.0040.00417.17
8.0.160.0040.00417.13
8.0.150.0070.00017.32
8.0.140.0030.00517.05
8.0.130.0070.00013.73
8.0.120.0000.00817.32
8.0.110.0040.00417.18
8.0.100.0000.00717.20
8.0.90.0000.00817.30
8.0.80.0100.00617.19
8.0.70.0080.00017.20
8.0.60.0040.00417.11
8.0.50.0000.00817.18
8.0.30.0090.00917.58
8.0.20.0100.01017.47
8.0.10.0070.00017.32
8.0.00.0100.00716.98
7.4.330.0030.00315.02
7.4.320.0070.00016.97
7.4.300.0000.00616.77
7.4.290.0000.00716.77
7.4.280.0030.00616.87
7.4.270.0070.00016.80
7.4.260.0080.00016.78
7.4.250.0030.00616.86
7.4.240.0040.00416.81
7.4.230.0040.00416.99
7.4.220.0040.01416.96
7.4.210.0090.01216.82
7.4.200.0000.00716.90
7.4.160.0100.01016.76
7.4.150.0060.01917.40
7.4.140.0100.00817.86
7.4.130.0090.01016.67
7.4.120.0100.01016.81
7.4.110.0120.00616.92
7.4.100.0100.00716.93
7.4.90.0110.01417.07
7.4.80.0060.01219.39
7.4.70.0090.00816.85
7.4.60.0120.00316.88
7.4.50.0090.00017.00
7.4.40.0090.00816.71
7.4.30.0100.00716.84
7.4.00.0070.01215.14
7.3.330.0050.00313.54
7.3.320.0000.00513.52
7.3.310.0000.00916.74
7.3.300.0030.00316.57
7.3.290.0090.00716.65
7.3.280.0080.00816.51
7.3.270.0080.01217.40
7.3.260.0090.00916.64
7.3.250.0100.00816.75
7.3.240.0040.01316.53
7.3.230.0150.00716.75
7.3.210.0130.00716.59
7.3.200.0100.00619.39
7.3.190.0030.01316.87
7.3.180.0060.01316.86
7.3.170.0110.00816.86
7.3.160.0130.00716.54
7.3.120.0090.00914.92
7.3.110.0090.00614.94
7.3.100.0090.00614.79
7.3.90.0030.00914.85
7.3.80.0040.00415.07
7.3.70.0060.01014.94
7.3.60.0060.00915.00
7.3.50.0120.00314.86
7.3.40.0040.01214.78
7.3.30.0030.00614.95
7.3.20.0040.01116.77
7.3.10.0040.01116.62
7.3.00.0090.00616.69
7.2.330.0030.01317.11
7.2.320.0030.01317.20
7.2.310.0090.01517.14
7.2.300.0060.01016.84
7.2.290.0060.01217.01
7.2.250.0150.00615.29
7.2.240.0060.01015.42
7.2.230.0040.01114.93
7.2.220.0180.00014.80
7.2.210.0090.00615.23
7.2.200.0060.00315.23
7.2.190.0030.00715.30
7.2.180.0060.00915.33
7.2.170.0030.01315.18
7.2.00.0030.01519.73
7.1.330.0070.00716.04
7.1.320.0070.00315.73
7.1.310.0080.00415.92
7.1.300.0080.00315.75
7.1.290.0080.00415.91
7.1.280.0040.00916.15
7.1.270.0080.00416.03
7.1.260.0140.00016.18
7.1.100.0040.01317.91
7.1.70.0040.00417.45
7.1.60.0180.00719.32
7.1.50.0100.01317.09
7.1.00.0070.07322.75
7.0.200.0000.01017.09
7.0.140.0000.07722.17
7.0.60.0070.07720.07
7.0.50.0000.06017.91
7.0.40.0070.04020.29
7.0.30.0070.05020.24
7.0.20.0230.08020.31
7.0.10.0100.08720.47
7.0.00.0170.07320.32
5.6.280.0000.07720.95
5.6.210.0130.08020.77
5.6.200.0100.08018.38
5.6.190.0000.04720.63
5.6.180.3700.04720.71
5.6.170.0330.08720.60
5.6.160.0100.08020.58
5.6.150.0030.05318.36
5.6.140.0070.07718.39
5.6.130.0000.04318.31
5.6.120.0200.06321.20
5.6.110.0100.08021.19
5.6.100.0070.03721.14
5.6.90.0170.08021.26
5.6.80.0000.04320.66
5.6.70.4370.04020.68
5.5.350.0300.07320.52
5.5.340.0070.08018.12
5.5.330.0030.05720.68
5.5.320.3530.04020.44
5.5.310.0100.04720.39
5.5.300.0030.04018.13
5.5.290.0100.07718.18
5.5.280.0170.07321.08
5.5.270.0070.07320.79
5.5.260.0100.08320.96
5.5.250.0000.06320.76
5.5.240.0300.05720.18
5.4.450.0830.05719.43
5.4.440.0800.04719.38
5.4.430.0830.05019.78
5.4.420.0830.06319.72
5.4.410.0930.05719.48
5.4.400.0070.05719.10
5.4.390.0900.07319.36
5.4.380.0670.06319.21
5.4.370.0770.05719.40
5.4.360.0830.05319.40
5.4.350.0800.05719.23
5.4.340.0060.03512.23
5.4.320.0100.03412.71
5.4.310.0050.03912.71
5.4.300.0050.03712.71
5.4.290.0050.03912.71
5.4.280.0040.03712.61
5.4.270.0060.03612.62
5.4.260.0060.03812.62
5.4.250.0090.03412.61
5.4.240.0040.03812.62
5.4.230.0070.03612.61
5.4.220.0040.03712.61
5.4.210.0040.03712.61
5.4.200.0050.03812.61
5.4.190.0050.03712.61
5.4.180.0080.03412.60
5.4.170.0020.03912.62
5.4.160.0080.03312.61
5.4.150.0050.03712.61
5.4.140.0050.03712.29
5.4.130.0050.03512.28
5.4.120.0080.03312.23
5.4.110.0090.03212.23
5.4.100.0080.03512.23
5.4.90.0080.04612.23
5.4.80.0070.04712.23
5.4.70.0060.03412.23
5.4.60.0040.03812.23
5.4.50.0080.03512.22
5.4.40.0040.03712.21
5.4.30.0060.03412.21
5.4.20.0040.03612.21
5.4.10.0050.04012.21
5.4.00.0080.04611.70
5.3.290.0050.05312.98
5.3.280.0080.03812.91
5.3.270.0090.03612.92
5.3.260.0060.04412.93
5.3.250.0050.03912.92
5.3.240.0090.03612.93
5.3.230.0060.04412.91
5.3.220.0120.04812.88
5.3.210.0110.03812.88
5.3.200.0060.04012.89
5.3.190.0110.03412.88
5.3.180.0040.03812.88
5.3.170.0070.04812.88
5.3.160.0050.04312.88
5.3.150.0070.03612.88
5.3.140.0070.03612.87
5.3.130.0050.04712.87
5.3.120.0160.04412.87
5.3.110.0040.04812.86
5.3.100.0060.03712.36
5.3.90.0060.04412.33
5.3.80.0070.04412.32
5.3.70.0120.04312.32
5.3.60.0060.03512.31
5.3.50.0090.03512.25
5.3.40.0070.03512.25
5.3.30.0090.06312.22
5.3.20.0150.04612.00
5.3.10.0060.04711.96
5.3.00.0040.03811.95
5.2.170.0050.0309.45
5.2.160.0030.0309.45
5.2.150.0030.0329.45
5.2.140.0060.0299.45
5.2.130.0030.0309.41
5.2.120.0060.0289.41
5.2.110.0050.0299.42
5.2.100.0040.0299.41
5.2.90.0070.0279.41
5.2.80.0060.0289.41
5.2.70.0080.0269.40
5.2.60.0040.0309.36
5.2.50.0050.0299.33
5.2.40.0060.0279.30
5.2.30.0060.0299.28
5.2.20.0090.0269.27
5.2.10.0080.0269.20
5.2.00.0060.0299.04
5.1.60.0050.0238.34
5.1.50.0050.0248.33
5.1.40.0020.0278.31
5.1.30.0060.0268.66
5.1.20.0160.0168.68
5.1.10.0080.0228.40
5.1.00.0060.0318.41
5.0.50.0020.0226.87
5.0.40.0040.0196.73
5.0.30.0060.0286.55
5.0.20.0040.0196.52
5.0.10.0030.0206.50
5.0.00.0050.0296.49
4.4.90.0020.0154.78
4.4.80.0090.0104.76
4.4.70.0030.0164.75
4.4.60.0030.0164.76
4.4.50.0030.0154.77
4.4.40.0030.0324.71
4.4.30.0010.0184.76
4.4.20.0010.0174.85
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0020.0164.67
4.3.100.0020.0164.66
4.3.90.0050.0124.63
4.3.80.0010.0264.59
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0060.0134.63
4.3.40.0010.0254.53
4.3.30.0020.0163.28
4.3.20.0010.0173.26
4.3.10.0010.0163.21
4.3.00.0030.0277.00

preferences:
42.46 ms | 401 KiB | 5 Q