3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <child name='BUYA' /> </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './/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.60.0070.01418.81
8.3.50.0120.01022.18
8.3.40.0110.00718.99
8.3.30.0030.01219.51
8.3.20.0050.00320.68
8.3.10.0000.00824.04
8.3.00.0000.00819.63
8.2.180.0070.00717.25
8.2.170.0140.00422.96
8.2.160.0030.01320.77
8.2.150.0000.00924.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00022.49
8.2.110.0100.00021.48
8.2.100.0060.00818.28
8.2.90.0040.00418.28
8.2.80.0060.00319.46
8.2.70.0060.00317.86
8.2.60.0060.00318.40
8.2.50.0090.00018.10
8.2.40.0060.00320.44
8.2.30.0030.00618.52
8.2.20.0040.00418.14
8.2.10.0000.00818.48
8.2.00.0000.00718.14
8.1.280.0090.00925.92
8.1.270.0040.00424.21
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0140.00322.84
8.1.230.0080.00421.41
8.1.220.0030.00618.02
8.1.210.0080.00019.35
8.1.200.0030.00717.63
8.1.190.0040.00417.60
8.1.180.0060.00318.10
8.1.170.0040.00418.90
8.1.160.0040.00422.36
8.1.150.0000.00719.21
8.1.140.0070.00017.77
8.1.130.0000.00818.21
8.1.120.0000.00817.96
8.1.110.0050.00317.67
8.1.100.0000.00717.93
8.1.90.0070.00017.91
8.1.80.0040.00417.81
8.1.70.0030.00317.64
8.1.60.0080.00018.00
8.1.50.0050.00317.84
8.1.40.0060.00317.78
8.1.30.0080.00017.91
8.1.20.0000.00718.10
8.1.10.0040.00417.98
8.1.00.0070.00017.68
8.0.300.0050.00220.44
8.0.290.0040.00417.00
8.0.280.0040.00418.79
8.0.270.0050.00217.65
8.0.260.0000.00617.59
8.0.250.0000.00717.41
8.0.240.0040.00417.18
8.0.230.0000.00717.26
8.0.220.0000.00817.35
8.0.210.0040.00417.34
8.0.200.0030.00317.37
8.0.190.0090.00017.40
8.0.180.0000.00817.27
8.0.170.0040.00417.28
8.0.160.0070.00317.32
8.0.150.0030.00517.25
8.0.140.0000.00817.29
8.0.130.0060.00013.77
8.0.120.0040.00417.25
8.0.110.0040.00417.13
8.0.100.0000.00717.32
8.0.90.0000.00717.23
8.0.80.0080.01517.21
8.0.70.0050.00217.13
8.0.60.0030.00517.13
8.0.50.0000.00817.23
8.0.30.0100.01017.51
8.0.20.0100.00817.40
8.0.10.0030.00617.23
8.0.00.0090.00917.12
7.4.330.0020.00215.49
7.4.320.0030.00317.09
7.4.300.0060.00016.89
7.4.290.0020.00516.95
7.4.280.0030.00516.95
7.4.270.0070.00017.06
7.4.260.0030.00316.96
7.4.250.0000.00716.75
7.4.240.0050.00316.92
7.4.230.0030.00316.77
7.4.220.0140.00416.99
7.4.210.0060.00916.95
7.4.200.0040.00416.97
7.4.160.0030.01916.98
7.4.150.0110.00717.40
7.4.140.0140.00517.86
7.4.130.0090.00816.99
7.4.120.0080.00916.98
7.4.110.0090.00916.95
7.4.100.0130.00516.95
7.4.90.0030.01416.95
7.4.80.0090.00919.39
7.4.70.0060.01516.94
7.4.60.0130.00316.93
7.4.50.0090.00016.90
7.4.40.0000.01516.88
7.4.30.0070.01417.09
7.4.00.0060.00614.98
7.3.330.0000.00613.54
7.3.320.0000.00813.39
7.3.310.0000.00716.75
7.3.300.0080.00016.61
7.3.290.0090.00616.74
7.3.280.0080.01016.65
7.3.270.0090.00917.40
7.3.260.0070.01516.69
7.3.250.0080.00816.76
7.3.240.0130.00416.76
7.3.230.0110.00616.76
7.3.210.0000.01716.71
7.3.200.0160.00719.39
7.3.190.0170.00016.74
7.3.180.0080.00816.77
7.3.170.0170.00016.72
7.3.160.0060.01216.89
7.3.10.0120.00916.47
7.3.00.0180.00016.53
7.2.330.0090.00917.12
7.2.320.0090.00817.01
7.2.310.0090.00917.01
7.2.300.0110.00616.95
7.2.290.0110.01417.33
7.2.130.0040.01116.90
7.2.120.0080.00816.84
7.2.110.0070.00716.95
7.2.100.0000.01816.75
7.2.90.0170.00317.01
7.2.80.0000.01416.90
7.2.70.0180.00017.08
7.2.60.0070.01016.80
7.2.50.0080.00816.94
7.2.40.0100.00717.13
7.2.30.0090.00617.00
7.2.20.0040.01117.05
7.2.10.0070.01316.71
7.2.00.0100.00918.29
7.1.250.0130.00315.79
7.1.240.0060.01315.88
7.1.230.0070.00715.82
7.1.220.0120.00615.67
7.1.210.0030.01015.48
7.1.200.0070.00715.91
7.1.190.0060.01115.84
7.1.180.0100.00315.69
7.1.170.0130.00315.99
7.1.160.0030.01015.68
7.1.150.0120.00615.73
7.1.140.0090.00915.79
7.1.130.0090.00615.98
7.1.120.0070.01115.77
7.1.110.0120.00415.74
7.1.100.0040.00916.88
7.1.90.0080.00415.58
7.1.80.0000.01115.75
7.1.70.0080.00416.54
7.1.60.0100.00917.52
7.1.50.0050.01416.38
7.1.40.0030.00915.90
7.1.30.0080.00815.67
7.1.20.0130.00615.63
7.1.10.0100.01015.87
7.1.00.0080.03919.14
7.0.330.0100.00315.56
7.0.320.0140.00015.29
7.0.310.0070.01415.39
7.0.300.0030.01615.35
7.0.290.0040.01315.28
7.0.280.0090.00615.53
7.0.270.0080.00715.33
7.0.260.0040.00815.36
7.0.250.0080.00815.74
7.0.240.0130.00315.39
7.0.230.0110.00715.46
7.0.220.0000.01215.61
7.0.210.0000.01415.34
7.0.200.0050.00616.18
7.0.190.0100.00715.36
7.0.180.0110.00315.34
7.0.170.0070.00715.47
7.0.160.0140.00415.40
7.0.150.0060.01015.50
7.0.140.0110.03518.79
7.0.130.0080.00815.32
7.0.120.0130.00615.26
7.0.110.0080.00815.52
7.0.100.0130.00315.39
7.0.90.0090.00615.38
7.0.80.0120.00315.62
7.0.70.0070.01015.62
7.0.60.0050.04617.87
7.0.50.0110.02116.73
7.0.40.0060.02416.99
7.0.30.0280.04016.94
7.0.20.0130.04016.81
7.0.10.0130.04016.96
7.0.00.0130.04016.96
5.6.380.0040.00414.10
5.6.370.0090.00614.58
5.6.360.0030.00614.64
5.6.350.0070.00714.56
5.6.340.0060.00914.52
5.6.330.0060.00314.42
5.6.320.0090.00314.36
5.6.310.0000.01314.19
5.6.300.0040.01414.36
5.6.290.0090.00414.73
5.6.280.0040.04217.94
5.6.270.0070.00714.42
5.6.260.0110.00414.23
5.6.250.0060.01214.45
5.6.240.0070.01014.29
5.6.230.0070.00714.36
5.6.220.0070.00714.04
5.6.210.0110.03817.68
5.6.200.0060.03016.54
5.6.190.0040.02917.46
5.6.180.0180.04217.65
5.6.170.0200.03717.37
5.6.160.0050.04017.38
5.6.150.0080.03716.13
5.6.140.0050.02816.30
5.6.130.0050.04216.42
5.6.120.0070.02517.56
5.6.110.0050.04917.83
5.6.100.0140.04017.66
5.6.90.0110.03217.80
5.6.80.0130.03217.35
5.6.70.0100.00314.49
5.6.60.0060.01214.27
5.6.50.0040.01614.27
5.6.40.0110.00913.98
5.6.30.0150.00714.15
5.6.20.0170.00614.07
5.6.10.0060.01314.18
5.6.00.0110.01114.02
5.5.380.0040.00711.17
5.5.370.0030.00310.88
5.5.360.0000.01110.87
5.5.350.0080.01815.82
5.5.340.0000.02614.56
5.5.330.0070.04315.92
5.5.320.0210.02715.99
5.5.310.0170.03715.66
5.5.300.0030.04114.83
5.5.290.0020.02514.76
5.5.280.0070.03016.15
5.5.270.0050.03715.79
5.5.260.0050.03116.21
5.5.250.0100.04015.88
5.5.240.0120.04115.87
5.5.230.0040.00811.31
5.5.220.0040.00410.95
5.5.210.0000.01210.68
5.5.200.0080.00410.88
5.5.190.0000.01410.77
5.5.180.0070.00710.96
5.5.170.0100.00310.97
5.5.160.0040.00911.16
5.5.150.0090.00311.02
5.5.140.0000.01010.79
5.5.130.0060.00811.10
5.5.120.0000.01010.85
5.5.110.0040.01411.19
5.5.100.0060.00611.06
5.5.90.0030.00611.26
5.5.80.0070.00011.37
5.5.70.0030.01011.18
5.5.60.0040.00811.18
5.5.50.0030.00611.23
5.5.40.0060.00611.11
5.5.30.0040.00810.93
5.5.20.0080.00311.14
5.5.10.0000.00610.97
5.5.00.0090.00311.09
5.4.450.0500.02915.16
5.4.440.0450.03015.27
5.4.430.0570.03515.34
5.4.420.0320.00615.38
5.4.410.0340.00415.20
5.4.400.0350.00215.04
5.4.390.0360.00314.97
5.4.380.0370.00415.12
5.4.370.0350.00614.98
5.4.360.0330.00515.12
5.4.350.0350.00415.06
5.4.340.0070.02111.53
5.4.330.0060.01210.53
5.4.320.0090.01911.82
5.4.310.0100.01911.97
5.4.300.0060.02211.85
5.4.290.0070.02211.89
5.4.280.0050.02211.79
5.4.270.0060.02111.82
5.4.260.0050.02311.84
5.4.250.0070.02111.75
5.4.240.0030.02011.98
5.4.230.0000.02711.93
5.4.220.0040.02211.76
5.4.210.0060.01911.83
5.4.200.0070.02011.80
5.4.190.0050.02111.77
5.4.180.0100.02011.77
5.4.170.0040.02311.72
5.4.160.0080.01911.73
5.4.150.0040.02311.74
5.4.140.0030.02311.68
5.4.130.0050.02111.52
5.4.120.0050.02011.39
5.4.110.0020.02311.50
5.4.100.0070.01811.48
5.4.90.0040.02311.55
5.4.80.0020.02411.57
5.4.70.0030.02411.56
5.4.60.0060.01911.61
5.4.50.0070.02111.62
5.4.40.0090.01911.51
5.4.30.0060.02111.64
5.4.20.0040.02211.63
5.4.10.0080.01911.64
5.4.00.0040.02311.34
5.3.290.0050.02211.38
5.3.280.0040.02011.37
5.3.270.0070.01911.45
5.3.260.0070.02011.45
5.3.250.0040.02211.36
5.3.240.0040.02011.33
5.3.230.0050.02211.38
5.3.220.0030.02411.40
5.3.210.0030.02211.28
5.3.200.0040.02111.43
5.3.190.0040.02311.40
5.3.180.0060.02111.49
5.3.170.0040.02211.45
5.3.160.0090.01711.40
5.3.150.0100.01611.49
5.3.140.0040.02311.43
5.3.130.0020.02411.44
5.3.120.0060.02111.47
5.3.110.0050.02111.45
5.3.100.0080.02011.16
5.3.90.0020.02311.11
5.3.80.0040.02111.10
5.3.70.0050.02111.15
5.3.60.0080.01811.20
5.3.50.0060.01911.06
5.3.40.0040.02011.08
5.3.30.0050.02011.03
5.3.20.0050.02110.92
5.3.10.0030.02310.88
5.3.00.0040.01910.73
5.2.170.0070.0159.26
5.2.160.0050.0179.27
5.2.150.0010.0219.10
5.2.140.0050.0189.18
5.2.130.0020.0189.22
5.2.120.0040.0159.26
5.2.110.0060.0169.18
5.2.100.0040.0189.10
5.2.90.0060.0169.16
5.2.80.0010.0209.02
5.2.70.0030.0199.09
5.2.60.0040.0178.96
5.2.50.0020.0209.15
5.2.40.0040.0169.13
5.2.30.0060.0149.10
5.2.20.0030.0179.00
5.2.10.0030.0189.00
5.2.00.0040.0248.85
5.1.60.0030.0178.21
5.1.50.0030.0158.21
5.1.40.0020.0168.24
5.1.30.0030.0168.46
5.1.20.0050.0148.38
5.1.10.0050.0148.25
5.1.00.0030.0178.25
5.0.50.0020.0147.48
5.0.40.0010.0147.42
5.0.30.0020.0197.32
5.0.20.0020.0127.30
5.0.10.0040.0097.29
5.0.00.0030.0177.29
4.4.90.0030.0086.56
4.4.80.0020.0096.55
4.4.70.0030.0096.55
4.4.60.0040.0096.55
4.4.50.0020.0106.56
4.4.40.0050.0136.53
4.4.30.0020.0106.55
4.4.20.0030.0096.59
4.4.10.0020.0086.60
4.4.00.0040.0136.55
4.3.110.0050.0076.51
4.3.100.0040.0076.51
4.3.90.0010.0106.49
4.3.80.0010.0166.46
4.3.70.0040.0096.49
4.3.60.0030.0086.49
4.3.50.0040.0096.49
4.3.40.0010.0146.44
4.3.30.0010.0105.82
4.3.20.0020.0115.81
4.3.10.0020.0095.78
4.3.00.0050.0157.77

preferences:
45.47 ms | 401 KiB | 5 Q