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[@name="child2"]') as $child) { echo $child . "\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.40.0070.01418.96
8.3.30.0110.00319.26
8.3.20.0080.00020.58
8.3.10.0030.00524.09
8.3.00.0040.00419.50
8.2.170.0100.01022.96
8.2.160.0030.01020.60
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00022.56
8.2.110.0060.00321.34
8.2.100.0000.01218.13
8.2.90.0050.00319.59
8.2.80.0030.00517.97
8.2.70.0030.00617.75
8.2.60.0060.00318.41
8.2.50.0060.00318.07
8.2.40.0040.00420.33
8.2.30.0050.00218.59
8.2.20.0040.00417.86
8.2.10.0000.00718.51
8.2.00.0000.00818.12
8.1.270.0000.00924.20
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.31
8.1.230.0080.00419.41
8.1.220.0060.00318.02
8.1.210.0040.00418.77
8.1.200.0110.00017.60
8.1.190.0050.00317.60
8.1.180.0040.00418.10
8.1.170.0050.00320.76
8.1.160.0070.00022.34
8.1.150.0070.00019.32
8.1.140.0040.00417.79
8.1.130.0070.00018.08
8.1.120.0040.00417.68
8.1.110.0030.00517.68
8.1.100.0040.00417.69
8.1.90.0040.00417.87
8.1.80.0040.00417.69
8.1.70.0030.00317.68
8.1.60.0000.01317.99
8.1.50.0040.00417.88
8.1.40.0040.00417.70
8.1.30.0050.00318.07
8.1.20.0060.00318.03
8.1.10.0040.00417.87
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0080.00017.00
8.0.280.0000.00718.82
8.0.270.0070.00017.59
8.0.260.0060.00017.52
8.0.250.0030.00317.35
8.0.240.0030.00317.15
8.0.230.0030.00317.36
8.0.220.0000.00717.26
8.0.210.0030.00317.29
8.0.200.0030.00317.30
8.0.190.0040.00417.30
8.0.180.0040.00417.22
8.0.170.0080.00017.34
8.0.160.0030.00317.16
8.0.150.0070.00017.25
8.0.140.0000.00817.26
8.0.130.0000.00613.75
8.0.120.0050.00317.26
8.0.110.0040.00417.23
8.0.100.0080.00017.29
8.0.90.0000.00817.09
8.0.80.0060.00917.29
8.0.70.0000.00817.18
8.0.60.0040.00417.26
8.0.50.0030.00617.09
8.0.30.0100.00917.24
8.0.20.0130.00917.43
8.0.10.0000.00717.30
8.0.00.0100.00717.14
7.4.330.0070.00015.02
7.4.320.0000.00616.93
7.4.300.0040.00416.88
7.4.290.0070.00016.79
7.4.280.0040.00416.78
7.4.270.0000.00616.91
7.4.260.0000.00716.87
7.4.250.0040.00416.84
7.4.240.0030.00416.91
7.4.230.0030.00316.90
7.4.220.0110.00716.91
7.4.210.0030.01216.77
7.4.200.0040.00416.77
7.4.160.0090.00616.80
7.4.150.0130.00617.40
7.4.140.0130.00817.86
7.4.130.0090.00916.89
7.4.120.0070.01016.79
7.4.110.0060.01816.88
7.4.100.0090.00916.82
7.4.90.0030.01816.84
7.4.80.0100.00719.39
7.4.70.0160.00916.90
7.4.60.0070.01016.75
7.4.50.0000.00616.96
7.4.40.0090.01516.82
7.4.30.0130.00316.75
7.4.00.0070.01115.20
7.3.330.0000.00613.34
7.3.320.0000.00513.29
7.3.310.0050.00316.64
7.3.300.0040.00416.42
7.3.290.0080.00716.56
7.3.280.0100.00716.54
7.3.270.0140.00317.40
7.3.260.0140.00316.80
7.3.250.0110.00916.67
7.3.240.0090.01416.83
7.3.230.0070.01116.64
7.3.210.0120.00616.67
7.3.200.0100.01019.39
7.3.190.0150.00616.43
7.3.180.0080.00816.70
7.3.170.0140.00316.57
7.3.160.0030.01716.79
7.2.330.0090.01017.00
7.2.320.0040.01216.82
7.2.310.0130.00316.72
7.2.300.0070.01016.72
7.2.290.0080.01216.94
7.2.60.0030.01016.87
7.2.00.0070.00719.74
7.1.200.0070.00315.84
7.1.100.0030.00618.23
7.1.70.0040.00817.09
7.1.60.0030.02019.32
7.1.50.0160.00916.75
7.1.00.0030.07722.68
7.0.200.0030.00616.89
7.0.140.0100.06722.21
7.0.60.0070.06720.21
7.0.50.0100.06318.11
7.0.40.0200.06020.48
7.0.30.0500.05020.39
7.0.20.0200.03720.40
7.0.10.0000.05320.47
7.0.00.0170.07720.32
5.6.280.0000.07721.15
5.6.210.0170.05720.82
5.6.200.0100.03718.38
5.6.190.0030.05020.54
5.6.180.0330.07320.88
5.6.170.0230.08020.59
5.6.160.0100.08320.73
5.6.150.0030.07018.39
5.6.140.0070.07318.29
5.6.130.0030.06018.33
5.6.120.0070.04321.14
5.6.110.0100.08321.11
5.6.100.0200.06721.11
5.6.90.0100.06321.27
5.6.80.0030.06020.59
5.6.70.2600.03020.46
5.5.350.0330.07320.50
5.5.340.0030.06018.17
5.5.330.0000.08720.34
5.5.320.0200.04320.53
5.5.310.0200.03720.47
5.5.300.0100.03718.22
5.5.290.0070.05018.21
5.5.280.0000.04320.99
5.5.270.0100.08020.94
5.5.260.0130.07320.93
5.5.250.0000.08720.82
5.5.240.0270.05720.49
5.4.450.0600.05719.41
5.4.440.0630.06319.38
5.4.430.0670.05719.69
5.4.420.0830.05019.61
5.4.410.0770.05719.25
5.4.400.0770.04719.52
5.4.390.0700.05719.05
5.4.380.0530.05719.43
5.4.370.0800.03719.36
5.4.360.0630.05319.46
5.4.350.0630.05719.07
5.4.340.0050.04412.23
5.4.320.0110.04612.72
5.4.310.0060.04812.71
5.4.300.0100.04812.72
5.4.290.0040.04712.72
5.4.280.0060.04312.62
5.4.270.0150.05012.62
5.4.260.0060.04112.62
5.4.250.0060.04912.62
5.4.240.0050.04212.62
5.4.230.0080.03912.61
5.4.220.0090.03412.61
5.4.210.0070.03612.61
5.4.200.0080.04812.61
5.4.190.0080.04912.60
5.4.180.0090.04012.60
5.4.170.0080.03812.62
5.4.160.0070.03812.61
5.4.150.0080.03812.61
5.4.140.0210.06112.29
5.4.130.0200.06412.28
5.4.120.0110.06412.23
5.4.110.0100.07612.23
5.4.100.0130.03512.24
5.4.90.0120.07512.23
5.4.80.0150.05812.23
5.4.70.0100.03812.23
5.4.60.0080.04212.23
5.4.50.0080.04412.22
5.4.40.0040.03712.21
5.4.30.0040.03812.21
5.4.20.0110.04012.21
5.4.10.0070.04012.21
5.4.00.0070.03911.70
5.3.290.0060.04112.98
5.3.280.0060.04612.91
5.3.270.0060.04112.92
5.3.260.0060.04012.92
5.3.250.0040.04112.91
5.3.240.0050.03912.92
5.3.230.0050.03912.91
5.3.220.0080.04612.88
5.3.210.0080.03712.88
5.3.200.0080.03712.88
5.3.190.0060.03812.88
5.3.180.0060.03712.88
5.3.170.0080.03712.88
5.3.160.0080.04212.88
5.3.150.0090.04012.88
5.3.140.0130.08512.88
5.3.130.0090.05712.86
5.3.120.0050.05412.86
5.3.110.0170.04212.86
5.3.100.0050.04012.35
5.3.90.0140.04412.34
5.3.80.0110.04912.32
5.3.70.0130.04512.32
5.3.60.0090.05012.30
5.3.50.0130.04412.25
5.3.40.0100.03612.25
5.3.30.0100.03312.22
5.3.20.0060.03611.99
5.3.10.0090.03411.96
5.3.00.0030.03911.95
5.2.170.0050.0319.45
5.2.160.0050.0299.45
5.2.150.0080.0279.45
5.2.140.0050.0309.45
5.2.130.0040.0309.41
5.2.120.0040.0299.41
5.2.110.0060.0289.41
5.2.100.0070.0269.40
5.2.90.0060.0279.41
5.2.80.0030.0319.40
5.2.70.0060.0289.40
5.2.60.0050.0309.36
5.2.50.0040.0319.32
5.2.40.0060.0279.30
5.2.30.0090.0389.27
5.2.20.0100.0359.27
5.2.10.0040.0309.19
5.2.00.0070.0319.04
5.1.60.0060.0368.33
5.1.50.0060.0268.33
5.1.40.0040.0328.31
5.1.30.0090.0328.66
5.1.20.0030.0318.68
5.1.10.0060.0328.40
5.1.00.0070.0348.40
5.0.50.0050.0216.87
5.0.40.0080.0276.73
5.0.30.0070.0536.55
5.0.20.0060.0256.52
5.0.10.0030.0226.50
5.0.00.0030.0316.49
4.4.90.0020.0204.78
4.4.80.0060.0194.75
4.4.70.0030.0194.75
4.4.60.0050.0154.75
4.4.50.0030.0224.77
4.4.40.0050.0314.71
4.4.30.0050.0144.75
4.4.20.0020.0174.84
4.4.10.0030.0154.85
4.4.00.0010.0274.76
4.3.110.0020.0164.66
4.3.100.0040.0134.67
4.3.90.0030.0194.64
4.3.80.0020.0274.58
4.3.70.0020.0154.63
4.3.60.0010.0164.63
4.3.50.0040.0154.63
4.3.40.0050.0234.54
4.3.30.0010.0173.28
4.3.20.0020.0203.26
4.3.10.0020.0163.22
4.3.00.0200.0177.00

preferences:
48.38 ms | 400 KiB | 5 Q