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"]')->children() 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.60.0180.00418.80
8.3.50.0110.00822.19
8.3.40.0040.01119.17
8.3.30.0110.00419.42
8.3.20.0070.00020.45
8.3.10.0040.00423.98
8.3.00.0080.00019.63
8.2.180.0150.00719.16
8.2.170.0170.00322.96
8.2.160.0070.00720.72
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0020.00522.52
8.2.110.0070.00322.58
8.2.100.0030.01018.00
8.2.90.0040.00419.38
8.2.80.0050.00318.00
8.2.70.0030.00618.00
8.2.60.0000.00818.18
8.2.50.0060.00318.07
8.2.40.0000.00918.52
8.2.30.0040.00418.25
8.2.20.0040.00418.14
8.2.10.0040.00418.30
8.2.00.0000.00818.03
8.1.280.0120.01225.92
8.1.270.0050.00324.17
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00624.21
8.1.230.0120.00019.39
8.1.220.0030.00618.04
8.1.210.0040.00418.77
8.1.200.0050.00617.50
8.1.190.0000.00817.50
8.1.180.0000.00818.10
8.1.170.0040.00420.63
8.1.160.0030.00622.26
8.1.150.0000.00719.26
8.1.140.0040.00417.73
8.1.130.0000.00718.13
8.1.120.0030.00517.76
8.1.110.0040.00417.63
8.1.100.0000.00817.82
8.1.90.0040.00417.61
8.1.80.0040.00417.78
8.1.70.0030.00517.79
8.1.60.0040.00817.68
8.1.50.0040.00417.71
8.1.40.0070.00017.92
8.1.30.0040.00417.81
8.1.20.0000.00817.88
8.1.10.0050.00217.98
8.1.00.0000.00817.93
8.0.300.0000.00818.77
8.0.290.0000.00917.00
8.0.280.0030.00318.64
8.0.270.0030.00317.56
8.0.260.0030.00317.39
8.0.250.0030.00317.20
8.0.240.0000.00617.17
8.0.230.0000.00717.13
8.0.220.0000.00717.32
8.0.210.0070.00017.32
8.0.200.0030.00317.40
8.0.190.0060.00317.38
8.0.180.0040.00417.06
8.0.170.0060.00317.31
8.0.160.0050.00217.20
8.0.150.0000.00717.25
8.0.140.0020.00517.30
8.0.130.0060.00013.76
8.0.120.0070.00017.10
8.0.110.0040.00417.24
8.0.100.0070.00017.23
8.0.90.0040.00417.31
8.0.80.0100.00617.19
8.0.70.0070.00017.16
8.0.60.0000.00717.14
8.0.50.0070.00017.10
8.0.30.0120.00717.52
8.0.20.0180.00317.40
8.0.10.0040.00417.32
8.0.00.0070.01117.09
7.4.330.0000.00615.36
7.4.320.0040.00416.82
7.4.300.0030.00316.98
7.4.290.0050.00216.98
7.4.280.0000.00716.91
7.4.270.0030.00316.98
7.4.260.0000.01016.93
7.4.250.0050.00316.86
7.4.240.0020.00516.81
7.4.230.0030.00316.92
7.4.220.0150.00316.90
7.4.210.0090.00616.97
7.4.200.0040.00417.07
7.4.160.0100.00716.76
7.4.150.0100.00717.40
7.4.140.0130.00617.86
7.4.130.0070.01216.92
7.4.120.0050.01216.87
7.4.110.0110.00716.95
7.4.100.0070.01016.93
7.4.90.0030.01316.82
7.4.80.0100.00619.39
7.4.70.0060.01116.82
7.4.60.0070.01116.73
7.4.50.0000.00416.73
7.4.40.0150.00616.83
7.4.30.0100.00716.82
7.4.00.0070.01115.02
7.3.330.0000.00613.55
7.3.320.0000.00513.24
7.3.310.0040.00416.36
7.3.300.0000.00616.59
7.3.290.0070.01116.66
7.3.280.0070.01016.69
7.3.270.0040.01417.40
7.3.260.0090.00916.81
7.3.250.0130.00816.78
7.3.240.0080.00816.72
7.3.230.0110.01116.54
7.3.210.0150.00616.96
7.3.200.0060.00919.39
7.3.190.0100.00616.84
7.3.180.0190.00016.74
7.3.170.0070.01416.97
7.3.160.0130.00516.86
7.2.330.0100.01016.75
7.2.320.0090.00916.61
7.2.310.0090.00616.95
7.2.300.0060.01016.63
7.2.290.0150.00916.88
7.2.60.0100.00716.96
7.2.00.0060.00619.15
7.1.200.0090.00615.61
7.1.100.0040.00818.28
7.1.70.0090.00617.34
7.1.60.0100.01419.32
7.1.50.0060.01616.93
7.1.00.0030.07722.64
7.0.200.0040.00417.05
7.0.140.0000.07722.21
7.0.60.0070.08720.11
7.0.50.0100.05318.07
7.0.40.0070.04020.14
7.0.30.0630.04020.36
7.0.20.0370.06720.40
7.0.10.0270.05320.30
7.0.00.0030.08720.35
5.6.280.0130.06321.12
5.6.210.0100.04320.99
5.6.200.0030.08318.38
5.6.190.0130.08320.85
5.6.180.0300.07020.73
5.6.170.0230.08020.64
5.6.160.0030.04020.75
5.6.150.0100.04018.39
5.6.140.0000.04318.26
5.6.130.0070.04018.40
5.6.120.0030.08721.27
5.6.110.0070.07021.31
5.6.100.0030.04721.23
5.6.90.0200.07021.30
5.6.80.0170.07320.67
5.6.70.3170.03720.62
5.5.350.0130.07320.50
5.5.340.0130.07318.20
5.5.330.0070.08320.39
5.5.320.0330.04720.55
5.5.310.0230.07720.39
5.5.300.0070.03718.16
5.5.290.0070.08018.14
5.5.280.0070.07320.99
5.5.270.0100.03720.88
5.5.260.0030.07321.01
5.5.250.0070.07720.72
5.5.240.0270.05320.25
5.4.450.0800.05019.38
5.4.440.0670.06319.39
5.4.430.0830.07719.70
5.4.420.0830.06719.61
5.4.410.0500.06319.60
5.4.400.0670.06719.52
5.4.390.0800.05019.29
5.4.380.0800.04719.09
5.4.370.0730.06719.23
5.4.360.0830.04719.41
5.4.350.0800.04719.10
5.4.340.0050.03512.24
5.4.320.0060.03612.72
5.4.310.0070.03712.72
5.4.300.0000.04312.72
5.4.290.0060.03812.72
5.4.280.0090.03412.62
5.4.270.0060.03712.62
5.4.260.0080.03912.62
5.4.250.0070.03612.62
5.4.240.0040.03912.62
5.4.230.0060.03912.61
5.4.220.0090.03312.61
5.4.210.0060.03712.61
5.4.200.0070.03912.61
5.4.190.0080.03712.61
5.4.180.0100.03712.61
5.4.170.0050.03912.63
5.4.160.0090.04412.61
5.4.150.0080.03612.61
5.4.140.0060.04012.30
5.4.130.0060.03612.28
5.4.120.0020.04212.24
5.4.110.0040.03712.24
5.4.100.0060.03512.24
5.4.90.0080.04712.23
5.4.80.0050.04112.24
5.4.70.0070.04012.23
5.4.60.0060.03612.23
5.4.50.0060.03612.22
5.4.40.0090.03212.21
5.4.30.0060.03712.21
5.4.20.0090.03312.21
5.4.10.0080.03612.21
5.4.00.0040.03811.70
5.3.290.0050.04112.99
5.3.280.0070.03812.92
5.3.270.0070.03812.92
5.3.260.0070.03912.93
5.3.250.0030.04012.93
5.3.240.0070.03512.93
5.3.230.0060.03812.92
5.3.220.0080.03512.89
5.3.210.0060.04012.89
5.3.200.0040.03812.89
5.3.190.0060.03812.89
5.3.180.0060.03812.89
5.3.170.0030.04112.89
5.3.160.0050.03912.89
5.3.150.0070.03712.89
5.3.140.0050.04612.88
5.3.130.0120.04212.87
5.3.120.0060.03912.88
5.3.110.0070.03812.87
5.3.100.0070.03612.35
5.3.90.0060.03712.34
5.3.80.0060.03712.32
5.3.70.0060.03812.33
5.3.60.0090.04012.31
5.3.50.0080.03612.25
5.3.40.0070.03712.25
5.3.30.0040.03812.23
5.3.20.0070.03712.00
5.3.10.0060.03811.96
5.3.00.0080.03711.95
5.2.170.0030.0329.46
5.2.160.0060.0279.46
5.2.150.0050.0309.45
5.2.140.0090.0289.45
5.2.130.0030.0319.41
5.2.120.0050.0299.41
5.2.110.0040.0329.42
5.2.100.0060.0289.41
5.2.90.0050.0319.41
5.2.80.0020.0349.41
5.2.70.0060.0309.40
5.2.60.0080.0369.36
5.2.50.0060.0339.32
5.2.40.0050.0299.31
5.2.30.0040.0319.28
5.2.20.0070.0299.27
5.2.10.0040.0289.19
5.2.00.0020.0329.05
5.1.60.0050.0258.34
5.1.50.0060.0258.34
5.1.40.0030.0258.31
5.1.30.0070.0308.66
5.1.20.0050.0278.68
5.1.10.0070.0338.41
5.1.00.0070.0358.41
5.0.50.0040.0296.88
5.0.40.0050.0276.73
5.0.30.0040.0456.55
5.0.20.0100.0216.52
5.0.10.0070.0246.50
5.0.00.0050.0386.50
4.4.90.0040.0204.78
4.4.80.0030.0214.75
4.4.70.0010.0234.76
4.4.60.0040.0204.75
4.4.50.0050.0184.77
4.4.40.0070.0284.71
4.4.30.0060.0184.76
4.4.20.0020.0164.85
4.4.10.0060.0184.85
4.4.00.0050.0234.76
4.3.110.0040.0144.67
4.3.100.0020.0154.67
4.3.90.0040.0134.63
4.3.80.0040.0244.58
4.3.70.0010.0164.63
4.3.60.0020.0164.63
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0030.0143.28
4.3.20.0010.0173.26
4.3.10.0020.0153.22
4.3.00.0200.0177.00

preferences:
46.83 ms | 400 KiB | 5 Q