3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <root> <A> <someid>5</someid> </A> <B> <someid>15</someid> </B> </root> XML; $xml=simplexml_load_string($str); foreach($xml->xpath('//someid[text()="5"]') as $node) { echo $node; }

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.1rc20.0040.00417.21
8.1rc10.0020.00817.11
8.0.110.0040.00417.18
8.0.100.0080.00017.06
8.0.90.0000.00717.17
8.0.80.0130.00717.14
8.0.70.0040.00417.11
8.0.60.0040.00417.11
8.0.50.0040.00417.18
8.0.30.0170.02417.44
8.0.20.0090.00917.37
8.0.10.0040.00417.29
8.0.00.0030.01717.00
7.4.230.0080.00316.76
7.4.220.0030.02216.88
7.4.210.0000.01716.80
7.4.200.0040.00316.96
7.4.190.0000.00717.02
7.4.160.0120.00316.69
7.4.150.0070.01016.66
7.4.140.0150.00316.83
7.4.130.0060.01216.82
7.4.120.0060.01016.65
7.4.110.0110.00616.94
7.4.100.0100.00716.95
7.4.90.0140.00416.86
7.4.80.0130.00319.39
7.4.70.0100.00716.90
7.4.60.0030.01316.78
7.4.50.0030.00316.61
7.4.40.0040.01516.66
7.4.30.0080.00816.78
7.4.00.0030.01215.16
7.3.300.0040.00416.70
7.3.290.0060.01016.67
7.3.280.0140.00616.63
7.3.270.0130.00416.90
7.3.260.0060.01316.72
7.3.250.0080.01316.68
7.3.240.0030.01416.59
7.3.230.0130.01016.69
7.3.210.0070.01416.69
7.3.200.0120.00616.67
7.3.190.0180.00316.81
7.3.180.0100.00616.90
7.3.170.0030.01316.87
7.3.160.0030.01716.70
7.3.120.0070.00715.13
7.2.330.0140.00816.97
7.2.320.0140.00617.12
7.2.310.0090.01216.96
7.2.300.0100.00716.94
7.2.290.0150.00316.85
7.2.60.0030.00916.36
7.2.00.0030.00919.68
7.1.200.0030.00715.96
7.1.100.0310.00317.35
7.1.70.0060.00617.02
7.1.60.0030.02019.30
7.1.50.0070.01716.84
7.1.00.0000.08022.64
7.0.200.0000.00716.86
7.0.140.0030.07322.23
7.0.120.0100.06722.16
7.0.60.0100.08320.24
7.0.50.0100.07718.03
7.0.40.0130.03720.21
7.0.30.0230.04320.38
7.0.20.0200.05720.40
7.0.10.0030.06720.27
7.0.00.0170.03320.20
5.6.280.0000.07721.23
5.6.210.0070.06720.81
5.6.200.0100.07018.29
5.6.190.0070.06320.50
5.6.180.0100.04720.55
5.6.170.0230.08020.77
5.6.160.0170.07320.71
5.6.150.0030.05318.36
5.6.140.0030.03718.31
5.6.130.0100.08318.29
5.6.120.0030.04021.17
5.6.110.0130.05721.11
5.6.100.0070.08321.27
5.6.90.0070.08721.24
5.6.80.0030.08020.46
5.6.70.3330.03020.61
5.5.350.0270.07320.61
5.5.340.0070.08018.19
5.5.330.0070.04020.68
5.5.320.0170.04320.39
5.5.310.0330.07020.66
5.5.300.0000.05318.13
5.5.290.0070.04318.13
5.5.280.0030.04320.95
5.5.270.0030.04020.93
5.5.260.0030.09020.91
5.5.250.0030.04020.79
5.5.240.0300.07020.21
5.4.450.0030.08019.63
5.4.440.0070.05319.61
5.4.430.0000.04319.48
5.4.420.0170.06019.46
5.4.410.0100.07019.59
5.4.400.0070.06719.41
5.4.390.0030.05719.30
5.4.380.0100.07319.27
5.4.370.0130.06319.46
5.4.360.0100.03719.31
5.4.350.0000.08018.94
5.4.340.0070.03718.94
5.4.320.0230.05318.96
5.4.310.0070.07719.16
5.4.300.0170.06719.35
5.4.290.0130.04719.23
5.4.280.0130.07318.93
5.4.270.0070.07718.93
5.4.260.0070.07019.39
5.4.250.0130.07719.13
5.4.240.0070.07019.29
5.4.230.0030.05019.22
5.4.220.0030.06019.29
5.4.210.0100.07318.99
5.4.200.0070.08019.26
5.4.190.0030.04019.18
5.4.180.0000.04018.93
5.4.170.0100.08019.27
5.4.160.0100.03319.37
5.4.150.0030.03719.28
5.4.140.0070.03316.36
5.4.130.0000.03716.35
5.4.120.0070.04016.35
5.4.110.0000.03716.35
5.4.100.0030.03316.53
5.4.90.0000.03716.42
5.4.80.0000.03716.41
5.4.70.0030.03316.50
5.4.60.0030.03716.39
5.4.50.0070.03316.49
5.4.40.0070.03016.42
5.4.30.0030.03316.39
5.4.20.0070.03016.41
5.4.10.0070.03316.57
5.4.00.0030.03315.92
5.3.290.0100.06714.80
5.3.280.0130.06714.68
5.3.270.0170.07014.76
5.3.260.0100.03714.60
5.3.250.0000.04014.63
5.3.240.0030.04014.70
5.3.230.0130.02714.76
5.3.220.0000.03714.60
5.3.210.0030.04014.57
5.3.200.0000.03714.70
5.3.190.0070.03314.71
5.3.180.0000.04014.71
5.3.170.0030.03714.61
5.3.160.0070.04314.57
5.3.150.0000.03714.77
5.3.140.0070.03314.70
5.3.130.0000.04014.70
5.3.120.0030.03714.71
5.3.110.0030.03714.66
5.3.100.0030.03714.21
5.3.90.0000.03714.17
5.3.80.0070.03314.11
5.3.70.0000.03714.15
5.3.60.0030.03314.10
5.3.50.0030.03313.91
5.3.40.0000.03714.08
5.3.30.0070.03013.88
5.3.20.0030.03313.89
5.3.10.0030.03313.83
5.3.00.0000.03713.84
5.2.170.0030.03011.30
5.2.160.0000.03011.30
5.2.150.0000.03011.34
5.2.140.0000.03311.19
5.2.130.0070.02711.25
5.2.120.0000.03011.33
5.2.110.0030.02711.15
5.2.100.0000.03311.40
5.2.90.0030.03311.15
5.2.80.0000.03311.19
5.2.70.0070.02311.34
5.2.60.0000.03011.35
5.2.50.0000.03311.15
5.2.40.0030.02711.29
5.2.30.0000.04011.19
5.2.20.0030.03311.16
5.2.10.0000.03010.92
5.2.00.0000.03710.91
5.1.60.0070.02710.23
5.1.50.0070.03710.24
5.1.40.0000.04010.21
5.1.30.0000.02710.49
5.1.20.0000.02710.59
5.1.10.0030.03310.12
5.1.00.0070.05310.11
5.0.50.0100.0178.85
5.0.40.0030.0478.85
5.0.30.0000.0678.85
5.0.20.0100.0378.85
5.0.10.0030.0238.85
5.0.00.0030.0638.85
4.4.90.0000.0178.85
4.4.80.0000.0178.85
4.4.70.0030.0138.85
4.4.60.0070.0108.85
4.4.50.0030.0138.85
4.4.40.0000.0538.85
4.4.30.0030.0278.85
4.4.20.0000.0378.85
4.4.10.0000.0278.85
4.4.00.0000.0478.85
4.3.110.0030.0178.85
4.3.100.0030.0378.85
4.3.90.0030.0208.85
4.3.80.0030.0238.85
4.3.70.0000.0378.85
4.3.60.0000.0338.85
4.3.50.0030.0378.85
4.3.40.0070.0578.85
4.3.30.0000.0338.85
4.3.20.0030.0278.85
4.3.10.0000.0378.85
4.3.00.0000.0308.85

preferences:
989.31 ms | 454 KiB | 5 Q