3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <scales> <scale id="1" gender="*" age="*"> <d>5</d> <d>9</d> </scale> <scale id="2" gender="m" age="*"> <d>3</d> <d>0</d> </scale> <scale id="3" gender="*" age="19-39"> <d>12</d> <d>19</d> </scale> </scales> XML; $xml=simplexml_load_string($str); $result=$xml->xpath('//scale[@gender="*" or @gender="m"][@age="*" or @age="39-59"]'); foreach($result as $node) { echo $node->scale->d."\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.0060.00916.88
8.3.50.0130.00617.92
8.3.40.0100.01019.17
8.3.30.0150.00418.79
8.3.20.0000.00819.20
8.3.10.0060.00320.86
8.3.00.0070.00319.63
8.2.180.0140.00417.00
8.2.170.0070.00722.96
8.2.160.0070.00721.44
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00319.73
8.2.110.0090.00922.55
8.2.100.0070.00418.16
8.2.90.0000.00818.23
8.2.80.0050.00317.97
8.2.70.0040.00417.88
8.2.60.0050.00318.18
8.2.50.0000.00918.07
8.2.40.0000.00818.53
8.2.30.0040.00418.38
8.2.20.0050.00218.09
8.2.10.0060.00318.11
8.2.00.0060.00318.01
8.1.280.0070.00725.92
8.1.270.0070.00024.66
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0100.00722.39
8.1.230.0090.00322.91
8.1.220.0000.00818.16
8.1.210.0040.00419.14
8.1.200.0040.00417.73
8.1.190.0040.00417.75
8.1.180.0060.00318.10
8.1.170.0050.00319.07
8.1.160.0050.00319.22
8.1.150.0050.00219.07
8.1.140.0050.00217.81
8.1.130.0000.00818.16
8.1.120.0040.00417.85
8.1.110.0080.00017.67
8.1.100.0000.00717.64
8.1.90.0040.00417.91
8.1.80.0070.00017.84
8.1.70.0070.00017.66
8.1.60.0090.00018.04
8.1.50.0030.00517.92
8.1.40.0030.00617.88
8.1.30.0040.00417.84
8.1.20.0050.00317.98
8.1.10.0040.00417.80
8.1.00.0090.00017.62
8.0.300.0040.00420.14
8.0.290.0040.00417.13
8.0.280.0040.00418.73
8.0.270.0040.00417.64
8.0.260.0050.00317.22
8.0.250.0000.00817.24
8.0.240.0000.00717.31
8.0.230.0040.00417.39
8.0.220.0050.00217.42
8.0.210.0070.00017.34
8.0.200.0040.00417.38
8.0.190.0000.00717.48
8.0.180.0040.00417.40
8.0.170.0060.00317.38
8.0.160.0040.00417.34
8.0.150.0060.00317.31
8.0.140.0070.00417.32
8.0.130.0050.00013.61
8.0.120.0000.00817.34
8.0.110.0000.00817.37
8.0.100.0040.00417.21
8.0.90.0050.00217.29
8.0.80.0120.00917.38
8.0.70.0000.00717.26
8.0.60.0040.00417.43
8.0.50.0000.00817.09
8.0.30.0090.01017.28
8.0.20.0120.00617.51
8.0.10.0040.00417.41
8.0.00.0130.00717.23
7.4.330.0000.00513.34
7.4.320.0030.00316.80
7.4.300.0030.00316.90
7.4.290.0000.00716.80
7.4.280.0000.00816.91
7.4.270.0040.00416.85
7.4.260.0000.00613.70
7.4.250.0050.00316.78
7.4.240.0000.00816.87
7.4.230.0080.00017.00
7.4.220.0100.01316.97
7.4.210.0080.00716.98
7.4.200.0000.00717.00
7.4.190.0040.00416.99
7.4.160.0100.00716.84
7.4.150.0070.01817.02
7.4.140.0110.00616.90
7.4.130.0060.01116.91
7.4.120.0120.00616.89
7.4.110.0030.01316.82
7.4.100.0130.01017.00
7.4.90.0110.00716.80
7.4.80.0100.01019.39
7.4.70.0140.00716.73
7.4.60.0080.01516.90
7.4.50.0070.00016.83
7.4.40.0000.01416.67
7.4.30.0060.01016.78
7.4.00.0080.00915.09
7.3.330.0030.00313.61
7.3.320.0000.00613.59
7.3.310.0030.00316.57
7.3.300.0000.00716.63
7.3.290.0030.01616.80
7.3.280.0100.00716.71
7.3.270.0090.00916.75
7.3.260.0070.01016.72
7.3.250.0100.01116.81
7.3.240.0000.02316.74
7.3.230.0090.00916.82
7.3.210.0100.00716.93
7.3.200.0120.00916.83
7.3.190.0040.01416.69
7.3.180.0090.00616.87
7.3.170.0120.00916.76
7.3.160.0110.00716.68
7.3.120.0040.01415.25
7.2.330.0070.01317.12
7.2.320.0120.00616.80
7.2.310.0000.01917.20
7.2.300.0140.00517.01
7.2.290.0090.00616.88
7.2.00.0030.00719.22
7.1.100.0030.00918.07
7.1.70.0030.00717.18
7.1.60.0070.01719.40
7.1.50.0040.00716.97
7.1.00.0030.07722.75
7.0.200.0040.00416.94
7.0.140.0000.07722.16
7.0.120.0070.07322.20
7.0.60.0030.07320.13
7.0.50.0070.08017.90
7.0.40.0030.05020.12
7.0.30.0200.04720.46
7.0.20.0370.05320.28
7.0.10.0030.04320.34
7.0.00.0070.04020.48
5.6.280.0030.07321.13
5.6.210.0070.08020.72
5.6.200.0100.07018.27
5.6.190.0070.08720.92
5.6.180.0170.04020.63
5.6.170.0230.04720.67
5.6.160.0100.03320.59
5.6.150.0100.04718.37
5.6.140.0070.08318.37
5.6.130.0030.08718.38
5.6.120.0100.08321.25
5.6.110.0170.07721.17
5.6.100.0170.06321.19
5.6.90.0030.09021.26
5.6.80.0130.06720.50
5.5.350.0030.06720.48
5.5.340.0100.07718.17
5.5.330.0070.04720.36
5.5.320.3600.04020.45
5.5.310.0270.06020.57
5.5.300.0030.05318.14
5.5.290.0130.05318.13
5.5.280.0030.04020.95
5.5.270.0100.03321.13
5.5.260.0100.07021.15
5.5.250.0030.06720.71
5.5.240.0030.05020.34
5.4.450.0130.07719.66
5.4.440.0130.05719.29
5.4.430.0030.05719.62
5.4.420.0100.07319.46
5.4.410.0000.04719.16
5.4.400.0030.07319.01
5.4.390.0070.08018.94
5.4.380.0100.07319.40
5.4.370.0030.06718.96
5.4.360.0100.04318.96
5.4.350.0030.07719.30
5.4.340.0070.06319.27
5.4.320.0100.06719.19
5.4.310.0100.07719.30
5.4.300.0100.03718.94
5.4.290.0070.07719.29
5.4.280.0100.04019.49
5.4.270.0070.06719.13
5.4.260.0070.07319.14
5.4.250.0030.03718.95
5.4.240.0070.07719.13
5.4.230.0030.05319.09
5.4.220.0100.07319.29
5.4.210.0130.05019.39
5.4.200.0030.07319.45
5.4.190.0070.07718.93
5.4.180.0130.06319.29
5.4.170.0100.03319.38
5.4.160.0030.03718.95
5.4.150.0030.06319.38
5.4.140.0030.03716.55
5.4.130.0070.07316.54
5.4.120.0030.07016.57
5.4.110.0030.03716.48
5.4.100.0100.03716.57
5.4.90.0070.05716.50
5.4.80.0070.06316.66
5.4.70.0130.05316.46
5.4.60.0030.04316.55
5.4.50.0030.07716.60
5.4.40.0100.04016.48
5.4.30.0030.07016.78
5.4.20.0070.07016.54
5.4.10.0030.08316.48
5.4.00.0070.04716.00
5.3.290.0070.04314.91
5.3.280.0070.07314.63
5.3.270.0070.03714.66
5.3.260.0070.06314.75
5.3.250.0030.04714.75
5.3.240.0070.04014.64
5.3.230.0130.04014.68
5.3.220.0100.06714.62
5.3.210.0130.03314.71
5.3.200.0100.05714.73
5.3.190.0130.05314.60
5.3.180.0070.08014.81
5.3.170.0070.07314.72
5.3.160.0100.05314.77
5.3.150.0100.07314.64
5.3.140.0030.07714.59
5.3.130.0030.05014.79
5.3.120.0100.07714.62
5.3.110.0100.06314.63
5.3.100.0070.05014.07
5.3.90.0030.04314.23
5.3.80.0130.06714.10
5.3.70.0000.04014.27
5.3.60.0100.03714.16
5.3.50.0100.06714.19
5.3.40.0030.07713.95
5.3.30.0070.04714.15
5.3.20.0070.04313.82
5.3.10.0030.03713.73
5.3.00.0130.07013.79
5.2.170.0070.06011.21
5.2.160.0100.04011.30
5.2.150.0000.03711.37
5.2.140.0000.06311.35
5.2.130.0070.05711.34
5.2.120.0130.05011.22
5.2.110.0030.05311.30
5.2.100.0000.04711.17
5.2.90.0130.04311.13
5.2.80.0030.03311.40
5.2.70.0000.05311.23
5.2.60.0070.03311.19
5.2.50.0030.06711.17
5.2.40.0000.06311.02
5.2.30.0070.03311.02
5.2.20.0070.05711.17
5.2.10.0100.04311.09
5.2.00.0100.03710.94
5.1.60.0000.04310.21
5.1.50.0130.04710.17
5.1.40.0100.03010.05
5.1.30.0070.05010.41
5.1.20.0030.03310.59
5.1.10.0070.04010.29
5.1.00.0000.04010.32
5.0.50.0030.0278.78
5.0.40.0000.0308.71
5.0.30.0030.0678.35
5.0.20.0100.0408.42
5.0.10.0070.0138.43
5.0.00.0000.0308.35
4.4.90.0000.0237.99
4.4.80.0000.0277.99
4.4.70.0070.0337.99
4.4.60.0000.0407.99
4.4.50.0000.0377.99
4.4.40.0030.0307.99
4.4.30.0030.0307.99
4.4.20.0030.0277.99
4.4.10.0030.0337.99
4.4.00.0000.0607.99
4.3.110.0000.0337.99
4.3.100.0000.0377.99
4.3.90.0000.0207.99
4.3.80.0000.0377.99
4.3.70.0030.0277.99
4.3.60.0000.0177.99
4.3.50.0030.0137.99
4.3.40.0030.0207.99
4.3.30.0000.0177.99
4.3.20.0000.0177.99
4.3.10.0000.0177.99
4.3.00.0000.0207.99

preferences:
53.48 ms | 400 KiB | 5 Q