3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <scales> <scale id="1" gender="*" age="*"> <d scid="hi" raw="10" t="76" /> <d scid="pn" raw="12" t="80" /> </scale> <scale id="2" gender="m" age="*"> <d scid="hi" raw="8" t="79" /> <d scid="pn" raw="2" t="50" /> </scale> <scale id="3" gender="*" age="19-39"> <d scid="hi" raw="0" t="48" /> <d scid="pn" raw="10" t="49" /> </scale> </scales> XML; $xml=simplexml_load_string($str); $result=$xml->xpath('//d[@scid="hi"][@raw="10"]'); //$result=$xml->xpath('//scale[@gender="*" or @gender="m"][@age="*" or @age="39-59"]'); var_dump($result);

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.0220.00016.73
8.3.50.0100.01117.84
8.3.40.0070.01118.91
8.3.30.0160.00619.04
8.3.20.0090.00018.95
8.3.10.0040.00420.78
8.3.00.0080.00017.63
8.2.180.0150.00317.00
8.2.170.0140.00722.96
8.2.160.0070.00722.80
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00420.20
8.2.110.0070.00321.41
8.2.100.0060.00618.16
8.2.90.0100.00021.28
8.2.80.0080.00018.28
8.2.70.0040.00417.88
8.2.60.0030.00618.18
8.2.50.0030.00518.07
8.2.40.0000.00818.34
8.2.30.0040.00418.35
8.2.20.0050.00318.02
8.2.10.0050.00318.08
8.2.00.0040.00417.95
8.1.280.0130.00625.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00322.79
8.1.230.0110.00021.22
8.1.220.0000.00818.16
8.1.210.0050.00319.29
8.1.200.0000.01117.60
8.1.190.0000.00817.68
8.1.180.0060.00318.10
8.1.170.0040.00419.01
8.1.160.0070.00019.21
8.1.150.0000.00818.97
8.1.140.0080.00017.67
8.1.130.0000.00718.17
8.1.120.0040.00417.56
8.1.110.0050.00317.64
8.1.100.0040.00417.55
8.1.90.0050.00317.55
8.1.80.0080.00017.61
8.1.70.0070.00017.77
8.1.60.0090.00017.90
8.1.50.0030.00517.87
8.1.40.0040.00417.65
8.1.30.0000.00718.01
8.1.20.0030.00618.04
8.1.10.0000.00817.69
8.1.00.0060.00317.62
8.0.300.0040.00420.23
8.0.290.0000.00817.00
8.0.280.0030.00318.76
8.0.270.0040.00417.64
8.0.260.0000.00817.26
8.0.250.0020.00517.18
8.0.240.0060.00317.38
8.0.230.0030.00317.23
8.0.220.0030.00317.09
8.0.210.0070.00017.11
8.0.200.0030.00317.42
8.0.190.0000.00917.30
8.0.180.0040.00417.10
8.0.170.0040.00417.11
8.0.160.0040.00417.35
8.0.150.0040.00417.36
8.0.140.0040.00417.09
8.0.130.0030.00313.73
8.0.120.0040.00417.13
8.0.110.0000.00717.21
8.0.100.0020.00517.04
8.0.90.0070.00017.13
8.0.80.0030.02017.24
8.0.70.0040.00417.29
8.0.60.0000.00817.28
8.0.50.0000.00717.22
8.0.30.0110.01017.30
8.0.20.0140.01417.45
8.0.10.0050.00317.20
8.0.00.0110.01117.08
7.4.330.0000.00513.21
7.4.320.0070.00016.85
7.4.300.0000.00716.83
7.4.290.0050.00216.84
7.4.280.0070.00016.74
7.4.270.0000.00816.68
7.4.260.0060.00013.60
7.4.250.0050.00516.80
7.4.240.0080.00016.85
7.4.230.0030.00316.62
7.4.220.0130.00716.91
7.4.210.0070.00816.84
7.4.200.0040.00416.91
7.4.190.0040.00416.82
7.4.160.0130.00316.67
7.4.150.0090.00916.88
7.4.140.0160.00716.76
7.4.130.0130.00616.72
7.4.120.0060.01116.82
7.4.110.0140.00416.76
7.4.100.0060.01516.82
7.4.90.0110.00716.73
7.4.80.0120.00916.78
7.4.70.0060.01216.76
7.4.60.0030.01416.88
7.4.50.0000.00516.85
7.4.40.0000.01516.64
7.4.30.0110.00616.63
7.4.00.0110.00414.89
7.3.330.0000.00613.47
7.3.320.0000.00513.43
7.3.310.0080.00016.53
7.3.300.0000.00716.49
7.3.290.0080.00616.49
7.3.280.0150.00116.48
7.3.270.0080.01516.64
7.3.260.0100.00916.58
7.3.250.0090.00916.60
7.3.240.0170.00016.57
7.3.230.0100.00716.55
7.3.210.0110.00616.64
7.3.200.0100.00719.39
7.3.190.0120.01116.64
7.3.180.0100.00616.44
7.3.170.0150.00616.66
7.3.160.0120.00416.56
7.3.120.0000.01614.84
7.3.10.0000.01416.65
7.3.00.0070.00416.69
7.2.330.0030.01616.79
7.2.320.0090.00916.64
7.2.310.0170.00716.59
7.2.300.0070.01016.65
7.2.290.0080.01016.74
7.2.130.0000.00817.19
7.2.120.0090.00316.96
7.2.110.0000.01217.02
7.2.100.0070.01017.05
7.2.90.0060.00617.14
7.2.80.0000.01816.71
7.2.70.0070.01016.80
7.2.60.0030.01116.95
7.2.50.0030.01416.83
7.2.40.0040.01116.77
7.2.30.0040.01117.07
7.2.20.0100.00716.88
7.2.10.0060.00616.92
7.2.00.0090.00416.71
7.1.250.0130.00015.92
7.1.70.0030.00517.25
7.1.60.0110.00719.40
7.1.50.0040.01116.71
7.1.00.0000.06322.57
7.0.200.0400.00414.43
7.0.140.0030.07322.13
7.0.120.0100.06722.20
7.0.60.0270.07320.21
7.0.50.0030.09017.96
7.0.40.0070.04320.25
7.0.30.0270.05720.57
7.0.20.0200.05320.33
7.0.10.0130.08020.33
7.0.00.0070.04020.23
5.6.210.0200.06020.59
5.6.200.0100.06718.34
5.6.190.0100.08320.89
5.6.180.0300.07320.82
5.6.170.0330.06720.75
5.6.160.0070.07320.64
5.6.150.0130.07018.33
5.6.140.0130.07718.36
5.6.130.0030.04318.32
5.6.120.0130.08021.14
5.6.110.0130.07721.20
5.6.100.0130.07321.18
5.6.90.0170.07321.27
5.6.80.0100.03320.52
5.5.350.0170.08020.48
5.5.340.0100.03718.21
5.5.330.0130.07320.70
5.5.320.0270.04320.55
5.5.310.0270.06320.57
5.5.300.0030.05018.12
5.5.290.0000.04318.10
5.5.280.0170.07721.13
5.5.270.0070.04721.11
5.5.260.0030.04721.13
5.5.250.0130.07720.73
5.5.240.3930.04320.34
5.4.450.0030.07319.72
5.4.440.0070.06019.68
5.4.430.0130.06719.48
5.4.420.0070.06019.72
5.4.410.0130.07019.14
5.4.400.0100.07319.43
5.4.390.0130.03018.98
5.4.380.0100.07319.36
5.4.370.0170.06319.32
5.4.360.0070.08019.00
5.4.350.0170.07319.46
5.4.340.0030.05019.13
5.4.320.0100.04719.32
5.4.310.0100.04019.31
5.4.300.0030.04719.40
5.4.290.0130.03319.36
5.4.280.0100.08319.13
5.4.270.0000.06319.36
5.4.260.0100.07019.36
5.4.250.0100.07719.14
5.4.240.0030.06719.23
5.4.230.0170.06319.29
5.4.220.0070.05019.30
5.4.210.0030.08019.12
5.4.200.0130.07019.30
5.4.190.0070.04719.39
5.4.180.0000.07719.45
5.4.170.0070.08019.22
5.4.160.0130.07019.23
5.4.150.0030.05019.35
5.4.140.0100.04016.58
5.4.130.0030.05016.53
5.4.120.0130.05316.56
5.4.110.0100.07016.61
5.4.100.0070.04316.63
5.4.90.0100.06716.68
5.4.80.0070.04016.60
5.4.70.0030.03716.49
5.4.60.0030.04016.79
5.4.50.0000.03716.55
5.4.40.0070.03316.55
5.4.30.0030.03316.45
5.4.20.0030.03316.55
5.4.10.0070.03016.55
5.4.00.0000.04015.99
5.3.290.0030.07714.84
5.3.280.0030.05314.75
5.3.270.0030.04014.75
5.3.260.0030.06714.77
5.3.250.0100.07714.78
5.3.240.0000.05714.81
5.3.230.0070.06714.80
5.3.220.0130.07314.68
5.3.210.0100.04314.77
5.3.200.0000.05014.69
5.3.190.0070.04314.58
5.3.180.0030.03714.73
5.3.170.0030.04014.71
5.3.160.0030.04014.57
5.3.150.0000.04314.61
5.3.140.0000.04014.66
5.3.130.0000.04014.56
5.3.120.0030.03714.74
5.3.110.0000.04014.56
5.3.100.0030.03714.09
5.3.90.0030.04014.14
5.3.80.0000.04014.03
5.3.70.0030.03714.26
5.3.60.0070.07314.20
5.3.50.0030.03714.02
5.3.40.0030.04014.10
5.3.30.0000.04014.03
5.3.20.0000.03713.73
5.3.10.0000.03713.79
5.3.00.0000.03713.61
5.2.170.0070.03711.27
5.2.160.0030.03311.34
5.2.150.0070.02711.18
5.2.140.0000.03011.36
5.2.130.0000.03011.26
5.2.120.0070.03011.31
5.2.110.0030.02711.25
5.2.100.0000.03011.28
5.2.90.0130.02311.31
5.2.80.0100.03311.30
5.2.70.0070.02311.22
5.2.60.0000.03311.12
5.2.50.0030.03011.16
5.2.40.0030.02711.14
5.2.30.0000.03011.02
5.2.20.0000.03011.29
5.2.10.0100.02010.94
5.2.00.0000.03310.94
5.1.60.0000.02310.23
5.1.50.0100.01710.21
5.1.40.0000.02310.22
5.1.30.0000.02710.63
5.1.20.0030.02310.54
5.1.10.0000.02710.35
5.1.00.0030.03010.39
5.0.50.0000.0238.62
5.0.40.0030.0178.48
5.0.30.0000.0308.48
5.0.20.0030.0208.38
5.0.10.0000.0238.40
5.0.00.0030.0308.39
4.4.90.0070.0107.92
4.4.80.0000.0177.92
4.4.70.0000.0177.92
4.4.60.0000.0177.92
4.4.50.0000.0137.92
4.4.40.0000.0277.92
4.4.30.0030.0137.92
4.4.20.0030.0137.92
4.4.10.0030.0137.92
4.4.00.0000.0237.92
4.3.110.0030.0137.92
4.3.100.0000.0137.92
4.3.90.0000.0137.92
4.3.80.0070.0177.92
4.3.70.0000.0237.92
4.3.60.0000.0237.92
4.3.50.0170.0137.92
4.3.40.0070.0377.92
4.3.30.0000.0177.92
4.3.20.0000.0437.92
4.3.10.0030.0307.92
4.3.00.0030.0207.92

preferences:
44.31 ms | 401 KiB | 5 Q