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.0140.00418.68
8.3.50.0050.01321.33
8.3.40.0090.00619.09
8.3.30.0060.00919.42
8.3.20.0060.00320.54
8.3.10.0080.00023.87
8.3.00.0150.00619.48
8.2.180.0120.00318.79
8.2.170.0150.00622.96
8.2.160.0000.01420.77
8.2.150.0000.00924.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00322.41
8.2.110.0060.00322.38
8.2.100.0040.00818.00
8.2.90.0040.00419.47
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0080.00018.29
8.2.50.0040.00418.07
8.2.40.0090.00020.26
8.2.30.0040.00418.38
8.2.20.0000.00817.97
8.2.10.0030.00618.37
8.2.00.0050.00318.01
8.1.280.0120.00925.92
8.1.270.0040.00424.35
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0100.01019.38
8.1.230.0060.00619.48
8.1.220.0040.00417.89
8.1.210.0000.00818.77
8.1.200.0040.00717.72
8.1.190.0030.00517.22
8.1.180.0060.00318.10
8.1.170.0030.00520.62
8.1.160.0000.00722.23
8.1.150.0040.00419.21
8.1.140.0080.00017.69
8.1.130.0070.00018.12
8.1.120.0000.00717.64
8.1.110.0060.00317.82
8.1.100.0040.00417.79
8.1.90.0050.00317.86
8.1.80.0000.00717.61
8.1.70.0000.00717.48
8.1.60.0060.00617.89
8.1.50.0040.00417.73
8.1.40.0030.00517.95
8.1.30.0000.00817.87
8.1.20.0040.00418.03
8.1.10.0000.00917.82
8.1.00.0080.00017.83
8.0.300.0000.00718.77
8.0.290.0080.00017.13
8.0.280.0000.00718.70
8.0.270.0030.00517.46
8.0.260.0030.00317.65
8.0.250.0030.00317.16
8.0.240.0000.00717.12
8.0.230.0030.00317.38
8.0.220.0000.00717.05
8.0.210.0050.00217.29
8.0.200.0030.00317.41
8.0.190.0000.00817.19
8.0.180.0080.00017.15
8.0.170.0050.00317.31
8.0.160.0030.00517.31
8.0.150.0000.00716.98
8.0.140.0040.00417.20
8.0.130.0030.00313.56
8.0.120.0000.00717.04
8.0.110.0040.00417.18
8.0.100.0040.00417.21
8.0.90.0000.00717.22
8.0.80.0100.00617.23
8.0.70.0050.00317.14
8.0.60.0080.00017.13
8.0.50.0040.00417.13
8.0.30.0090.00917.54
8.0.20.0110.01317.40
8.0.10.0050.00317.25
8.0.00.0110.01417.26
7.4.330.0000.00615.41
7.4.320.0000.00616.95
7.4.300.0000.00616.99
7.4.290.0030.00517.01
7.4.280.0070.00016.98
7.4.270.0030.00316.77
7.4.260.0050.00316.91
7.4.250.0040.00416.82
7.4.240.0020.00516.95
7.4.230.0070.00017.05
7.4.220.0080.01116.89
7.4.210.0090.00716.78
7.4.200.0000.00816.96
7.4.160.0140.00316.75
7.4.150.0190.00017.40
7.4.140.0110.00717.86
7.4.130.0110.00616.81
7.4.120.0050.01216.95
7.4.110.0130.00316.81
7.4.100.0030.01316.69
7.4.90.0070.01116.84
7.4.80.0100.01019.39
7.4.70.0200.00316.88
7.4.60.0090.00916.98
7.4.50.0020.00216.81
7.4.40.0100.00716.87
7.4.30.0120.00816.92
7.4.00.0060.00915.11
7.3.330.0050.00013.25
7.3.320.0060.00013.24
7.3.310.0000.00716.69
7.3.300.0030.00316.56
7.3.290.0060.00916.64
7.3.280.0080.00816.66
7.3.270.0150.00917.40
7.3.260.0090.00616.71
7.3.250.0060.01016.73
7.3.240.0060.01216.72
7.3.230.0110.01216.80
7.3.210.0120.00916.58
7.3.200.0090.01319.39
7.3.190.0140.00316.91
7.3.180.0160.00016.64
7.3.170.0030.01316.73
7.3.160.0100.00616.91
7.3.10.0030.01016.82
7.3.00.0110.00316.66
7.2.330.0110.00916.61
7.2.320.0120.00916.98
7.2.310.0050.01216.86
7.2.300.0030.01316.74
7.2.290.0140.00316.76
7.2.130.0000.01017.08
7.2.120.0130.00617.13
7.2.110.0070.00716.80
7.2.100.0000.01016.71
7.2.90.0060.00917.02
7.2.80.0070.00316.86
7.2.70.0110.00417.00
7.2.60.0030.01216.84
7.2.50.0090.00616.99
7.2.40.0030.01017.19
7.2.30.0100.00317.04
7.2.20.0070.00316.96
7.2.10.0100.00617.13
7.2.00.0040.01218.30
7.1.250.0030.00715.98
7.1.200.0080.00615.85
7.1.100.0000.01118.17
7.1.70.0160.01017.10
7.1.60.0110.01419.32
7.1.50.0100.01317.21
7.1.00.0030.07722.48
7.0.200.0000.00817.01
7.0.140.0100.06722.20
7.0.60.0200.07019.98
7.0.50.0100.04317.95
7.0.40.0030.06320.11
7.0.30.0430.04720.48
7.0.20.0130.04320.32
7.0.10.0030.04720.21
7.0.00.0130.08720.27
5.6.280.0070.07021.11
5.6.210.0070.06720.73
5.6.200.0130.03018.29
5.6.190.0070.09020.60
5.6.180.0200.04720.54
5.6.170.0270.07320.76
5.6.160.0130.08320.73
5.6.150.0100.07318.37
5.6.140.0100.07718.36
5.6.130.0170.04018.29
5.6.120.0100.08321.28
5.6.110.0070.05321.14
5.6.100.0130.07021.07
5.6.90.0070.07721.25
5.6.80.0000.04720.46
5.6.70.2870.03320.65
5.5.350.0170.08320.47
5.5.340.0100.07718.13
5.5.330.0070.07020.27
5.5.320.0370.03320.44
5.5.310.0230.04020.44
5.5.300.0130.07018.09
5.5.290.0100.08018.13
5.5.280.0070.04020.98
5.5.270.0030.09020.94
5.5.260.0100.06720.94
5.5.250.0100.07720.76
5.5.240.0170.06720.21
5.4.450.0370.08319.71
5.4.440.0200.07019.47
5.4.430.0230.04319.69
5.4.420.0130.04019.40
5.4.410.0170.03719.34
5.4.400.0170.07319.40
5.4.390.0270.07019.46
5.4.380.0200.07019.37
5.4.370.0200.04719.40
5.4.360.0330.08019.45
5.4.350.0200.03319.28
5.4.340.0170.06019.30
5.4.320.0130.04719.34
5.4.310.0170.03719.07
5.4.300.0230.03719.30
5.4.290.0200.03719.30
5.4.280.0230.07319.21
5.4.270.0170.03719.31
5.4.260.0170.04019.20
5.4.250.0230.05319.23
5.4.240.0170.04319.30
5.4.230.0130.04019.39
5.4.220.0200.04319.33
5.4.210.0170.05719.36
5.4.200.0170.03719.39
5.4.190.0130.04319.02
5.4.180.0170.03719.39
5.4.170.0130.04019.38
5.4.160.0270.02719.21
5.4.150.0130.04319.17
5.4.140.0170.04716.49
5.4.130.0130.04016.48
5.4.120.0200.04716.48
5.4.110.0170.03716.62
5.4.100.0170.03316.69
5.4.90.0170.03016.67
5.4.80.0200.03016.38
5.4.70.0200.03016.40
5.4.60.0170.03316.47
5.4.50.0170.04016.65
5.4.40.0070.04016.48
5.4.30.0170.04316.61
5.4.20.0230.02716.39
5.4.10.0270.04016.48
5.4.00.0230.03016.07
5.3.290.0130.04314.91
5.3.280.0070.06014.67
5.3.270.0200.04714.67
5.3.260.0370.03014.70
5.3.250.0200.07014.67
5.3.240.0200.05014.66
5.3.230.0170.04014.67
5.3.220.0200.03314.62
5.3.210.0200.05314.62
5.3.200.0100.04314.76
5.3.190.0130.04014.68
5.3.180.0170.04714.63
5.3.170.0170.03714.60
5.3.160.0270.05314.61
5.3.150.0200.03314.63
5.3.140.0270.04014.65
5.3.130.0270.03714.71
5.3.120.0170.03714.59
5.3.110.0100.04714.60
5.3.100.0200.03314.24
5.3.90.0170.03314.26
5.3.80.0170.05714.28
5.3.70.0100.04714.07
5.3.60.0200.03314.23
5.3.50.0130.03714.04
5.3.40.0200.03314.20
5.3.30.0200.03314.13
5.3.20.0070.03013.75
5.3.10.0100.06313.70
5.3.00.0270.02713.68
5.2.170.1570.03311.45
5.2.160.1770.03311.47
5.2.150.2130.04011.21
5.2.140.1700.03011.32
5.2.130.1970.03311.17
5.2.120.1870.03311.33
5.2.110.1800.03311.26
5.2.100.1900.03011.27
5.2.90.1770.03311.15
5.2.80.1530.03311.25
5.2.70.1530.03311.25
5.2.60.0030.03311.12
5.2.50.0030.03711.18
5.2.40.0070.03311.08
5.2.30.0070.02711.02
5.2.20.0830.04311.00
5.2.10.1300.02711.13
5.2.00.1470.03710.89
5.1.60.1330.02010.31
5.1.50.1370.01710.12
5.1.40.1430.03010.20
5.1.30.1300.02710.43
5.1.20.1600.02710.43
5.1.10.1500.02710.24
5.1.00.1600.03010.24
5.0.50.0770.0308.79
5.0.40.0700.0208.50
5.0.30.0670.0308.32
5.0.20.0830.0208.41
5.0.10.0730.0278.26
5.0.00.0530.0378.44
4.4.90.0000.0208.06
4.4.80.0000.0208.06
4.4.70.0030.0138.06
4.4.60.0000.0208.06
4.4.50.0000.0178.06
4.4.40.0000.0308.06
4.4.30.0000.0178.06
4.4.20.0200.0138.06
4.4.10.0670.0138.06
4.4.00.0630.0278.06
4.3.110.0800.0238.06
4.3.100.0800.0208.06
4.3.90.0830.0238.06
4.3.80.0770.0278.06
4.3.70.0800.0138.06
4.3.60.0770.0208.06
4.3.50.0830.0238.06
4.3.40.0670.0238.06
4.3.30.0430.0238.06
4.3.20.0370.0108.06
4.3.10.0430.0278.06
4.3.00.0330.0178.06

preferences:
39.19 ms | 401 KiB | 5 Q