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( '/root/parent/child') as $child) { echo $child->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.40.0100.01019.08
8.3.30.0130.00319.19
8.3.20.0040.00420.58
8.3.10.0090.00024.03
8.3.00.0000.00819.63
8.2.170.0170.00322.96
8.2.160.0070.01020.77
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00319.60
8.2.110.0030.00620.76
8.2.100.0090.00318.37
8.2.90.0080.00019.73
8.2.80.0040.00418.00
8.2.70.0000.00818.00
8.2.60.0070.00018.30
8.2.50.0030.00618.07
8.2.40.0080.00018.53
8.2.30.0030.00319.82
8.2.20.0000.00718.07
8.2.10.0040.00418.58
8.2.00.0000.00718.05
8.1.270.0000.00924.16
8.1.260.0080.00026.35
8.1.250.0150.00028.09
8.1.240.0060.00322.34
8.1.230.0070.00419.54
8.1.220.0000.00918.01
8.1.210.0060.00318.77
8.1.200.0000.00917.60
8.1.190.0040.00417.61
8.1.180.0000.00818.10
8.1.170.0030.00619.02
8.1.160.0050.00322.32
8.1.150.0000.00719.19
8.1.140.0060.00317.85
8.1.130.0000.00718.34
8.1.120.0050.00317.93
8.1.110.0000.00817.95
8.1.100.0000.00817.81
8.1.90.0040.00417.82
8.1.80.0000.00717.77
8.1.70.0000.00717.88
8.1.60.0000.00817.88
8.1.50.0000.00717.98
8.1.40.0040.00417.95
8.1.30.0030.00517.89
8.1.20.0000.00718.04
8.1.10.0000.00818.05
8.1.00.0000.00717.73
8.0.300.0060.00318.77
8.0.290.0040.00417.13
8.0.280.0000.00918.79
8.0.270.0040.00417.60
8.0.260.0060.00017.64
8.0.250.0030.00317.42
8.0.240.0030.00317.19
8.0.230.0050.00317.27
8.0.220.0060.00017.23
8.0.210.0040.00417.35
8.0.200.0000.00717.39
8.0.190.0040.00417.43
8.0.180.0000.00717.25
8.0.170.0050.00317.13
8.0.160.0000.00717.30
8.0.150.0000.00817.30
8.0.140.0000.00817.33
8.0.130.0000.00613.64
8.0.120.0040.00417.21
8.0.110.0050.00317.06
8.0.100.0000.00717.12
8.0.90.0030.00417.33
8.0.80.0060.00917.25
8.0.70.0050.00217.25
8.0.60.0070.00017.25
8.0.50.0070.00017.25
8.0.30.0050.01317.36
8.0.20.0090.01317.53
8.0.10.0000.00817.36
8.0.00.0090.01217.10
7.4.330.0050.00015.50
7.4.320.0040.00416.96
7.4.300.0000.00616.89
7.4.290.0030.00316.97
7.4.280.0000.00716.95
7.4.270.0080.00017.00
7.4.260.0090.00016.96
7.4.250.0030.00616.93
7.4.240.0070.00016.92
7.4.230.0040.00417.03
7.4.220.0120.00617.02
7.4.210.0060.01017.03
7.4.200.0000.00716.96
7.4.160.0070.01016.70
7.4.150.0160.00317.40
7.4.140.0060.01217.86
7.4.130.0100.01016.95
7.4.120.0130.00316.94
7.4.110.0030.01316.80
7.4.100.0040.01216.84
7.4.90.0070.01017.01
7.4.80.0000.01719.39
7.4.70.0130.00616.84
7.4.60.0140.00316.90
7.4.50.0000.00816.93
7.4.40.0090.00916.92
7.4.30.0070.01016.82
7.4.00.0070.00415.19
7.3.330.0050.00013.58
7.3.320.0030.00313.57
7.3.310.0000.00716.79
7.3.300.0070.00016.61
7.3.290.0030.01216.80
7.3.280.0080.00916.60
7.3.270.0090.00917.40
7.3.260.0110.00616.91
7.3.250.0060.01216.57
7.3.240.0100.01016.99
7.3.230.0060.01216.80
7.3.210.0110.00716.84
7.3.200.0060.01019.39
7.3.190.0130.01016.87
7.3.180.0040.01916.91
7.3.170.0240.00416.90
7.3.160.0060.00916.73
7.2.330.0090.01216.87
7.2.320.0070.01017.11
7.2.310.0090.01016.81
7.2.300.0140.01116.97
7.2.290.0130.00717.19
7.2.00.0100.00019.59
7.1.100.0350.00316.25
7.1.70.0030.00617.39
7.1.60.0070.01819.46
7.1.50.0120.00616.90
7.1.00.0030.07722.66
7.0.200.0000.00916.98
7.0.140.0070.07022.31
7.0.100.0100.07720.26
7.0.90.0070.07720.28
7.0.80.0070.05720.09
7.0.70.0030.08320.22
7.0.60.0100.07020.16
7.0.50.0070.07020.42
7.0.40.0030.04320.34
7.0.30.0070.04320.26
7.0.20.0130.03320.21
7.0.10.0100.03320.17
7.0.00.0000.05720.21
5.6.280.0030.07321.13
5.6.250.0130.07721.04
5.6.240.0070.08020.93
5.6.230.0130.08020.92
5.6.220.0130.07720.69
5.6.210.0100.06320.79
5.6.200.0100.08021.12
5.6.190.0030.04321.29
5.6.180.0100.03721.31
5.6.170.0130.03721.22
5.6.160.0100.04321.14
5.6.150.0070.03321.20
5.6.140.0000.04321.25
5.6.130.0030.04321.23
5.6.120.0070.03721.14
5.6.110.0030.04021.27
5.6.100.0070.04021.18
5.6.90.0100.04021.23
5.6.80.0070.07720.71
5.6.70.0100.03320.50
5.6.60.0000.06020.55
5.6.50.0000.05320.56
5.6.40.0000.05720.59
5.6.30.0030.04020.57
5.6.20.0030.04020.52
5.6.10.0030.04020.46
5.6.00.0030.03720.51
5.5.380.0100.07720.65
5.5.370.0100.07720.77
5.5.360.0030.08720.61
5.5.350.0070.08020.57
5.5.340.0100.08320.94
5.5.330.0030.04020.91
5.5.320.0000.04721.08
5.5.310.0070.04020.99
5.5.300.0000.05320.96
5.5.290.0030.05320.97
5.5.280.0000.04721.04
5.5.270.0070.03720.91
5.5.260.0100.03321.00
5.5.250.0030.04020.81
5.5.240.0030.07720.41
5.5.230.0070.04320.37
5.5.220.0030.03720.40
5.5.210.0100.03320.43
5.5.200.0070.03720.46
5.5.190.0000.04320.39
5.5.180.0070.03720.45
5.5.160.0000.04320.32
5.5.150.0000.05020.39
5.5.140.0070.07320.34
5.5.130.0030.06320.34
5.5.120.0030.08020.44
5.5.110.0000.07720.42
5.5.100.0100.07720.31
5.5.90.0100.07020.23
5.5.80.0030.07320.29
5.5.70.0070.05720.32
5.5.60.0070.06320.31
5.5.50.0070.08020.18
5.5.40.0030.07720.31
5.5.30.0200.06020.16
5.5.20.0100.07320.29
5.5.10.0030.06020.20
5.5.00.0070.05020.13
5.4.450.0000.04319.64
5.4.440.0030.04019.57
5.4.430.0030.04019.36
5.4.420.0030.04019.71
5.4.410.0000.04019.30
5.4.400.0000.04719.26
5.4.390.0000.06319.24
5.4.380.0100.05719.02
5.4.370.0000.04319.20
5.4.360.0070.04019.26
5.4.350.0030.03319.33
5.4.340.0000.04019.19
5.4.320.0100.02319.30
5.4.310.0070.05018.99
5.4.300.0070.03319.24
5.4.290.0030.07019.20
5.4.280.0000.08019.39
5.4.270.0130.07019.26
5.4.260.0130.05719.14
5.4.250.0030.08319.00
5.4.240.0100.07319.07
5.4.230.0030.07719.27
5.4.220.0130.07019.45
5.4.210.0100.06319.18
5.4.200.0100.08019.25
5.4.190.0130.06319.16
5.4.180.0070.07019.07
5.4.170.0070.08019.38
5.4.160.0030.07719.38
5.4.150.0030.07319.23
5.4.140.0070.06316.33
5.4.130.0000.05016.55
5.4.120.0130.06716.47
5.4.110.0030.07316.43
5.4.100.0100.07716.45
5.4.90.0000.06316.55
5.4.80.0100.04716.61
5.4.70.0130.03716.60
5.4.60.0000.04316.42
5.4.50.0130.06716.37
5.4.40.0030.04316.51
5.4.30.0130.06316.48
5.4.20.0070.04016.37
5.4.10.0070.07716.52
5.4.00.0070.06315.97
5.3.290.0030.03714.53
5.3.280.0130.07014.55
5.3.270.0170.06314.59
5.3.260.0000.05014.54
5.3.250.0070.08014.43
5.3.240.0070.07014.59
5.3.230.0100.07014.46
5.3.220.0030.08014.50
5.3.210.0170.06314.55
5.3.200.0000.08314.41
5.3.190.0100.05014.55
5.3.180.0030.08014.53
5.3.170.0100.07014.50
5.3.160.0070.03714.56
5.3.150.0100.06314.52
5.3.140.0070.07314.38
5.3.130.0030.06314.55
5.3.120.0070.07014.52
5.3.110.0070.07314.54
5.3.100.0100.03714.04
5.3.90.0070.06713.89
5.3.80.0070.07313.78
5.3.70.0000.08713.78
5.3.60.0000.08013.97
5.3.50.0030.04713.81
5.3.40.0000.08313.93
5.3.30.0070.07013.87
5.3.20.0070.06713.45
5.3.10.0100.07313.66
5.3.00.0000.07713.59
5.2.170.0100.05711.83
5.2.160.0070.06711.83
5.2.150.0030.06311.83
5.2.140.0000.05711.83
5.2.130.0000.06311.83
5.2.120.0100.05711.83
5.2.110.0100.05311.83
5.2.100.0030.06011.83
5.2.90.0100.05311.83
5.2.80.0030.04011.83
5.2.70.0100.05011.83
5.2.60.0000.06311.83
5.2.50.0100.05711.83
5.2.40.0070.04311.83
5.2.30.0030.05311.83
5.2.20.0000.06711.83
5.2.10.0000.06711.83
5.2.00.0030.06011.83
5.1.60.0030.04711.83
5.1.50.0000.05011.83
5.1.40.0000.05311.83
5.1.30.0030.05711.83
5.1.20.0000.05311.83
5.1.10.0000.03011.83
5.1.00.0070.05711.83
5.0.50.0070.04311.83
5.0.40.0000.04711.83
5.0.30.0000.06711.83
5.0.20.0030.04011.83
5.0.10.0030.04311.83
5.0.00.0000.06011.83
4.4.90.0070.02711.83
4.4.80.0030.03311.83
4.4.70.0030.03311.83
4.4.60.0030.02011.83
4.4.50.0070.02711.83
4.4.40.0000.05711.83
4.4.30.0000.04011.83
4.4.20.0000.02011.83
4.4.10.0070.03011.83
4.4.00.0070.05011.83
4.3.110.0030.03711.83
4.3.100.0070.03011.83
4.3.90.0030.03011.83
4.3.80.0000.03711.83
4.3.70.0070.03011.83
4.3.60.0000.03311.83
4.3.50.0000.04011.83
4.3.40.0030.05311.83
4.3.30.0000.03011.83
4.3.20.0030.03011.83
4.3.10.0030.03311.83
4.3.00.0000.02011.83

preferences:
41.79 ms | 400 KiB | 5 Q