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="*" and @age="*"]'); foreach($result as $node) { echo $node->attributes()->id."\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.0140.00718.93
8.3.50.0180.00321.33
8.3.40.0140.00318.95
8.3.30.0070.01020.54
8.3.20.0040.00420.54
8.3.10.0000.00722.45
8.3.00.0080.00022.81
8.2.180.0120.00316.72
8.2.170.0060.00922.96
8.2.160.0160.00020.71
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0170.00326.16
8.2.120.0140.00320.04
8.2.110.0040.00722.76
8.2.100.0090.00318.28
8.2.90.0030.00519.46
8.2.80.0030.00517.97
8.2.70.0000.00817.71
8.2.60.0000.00818.18
8.2.50.0000.00818.07
8.2.40.0040.00418.53
8.2.30.0000.00920.24
8.2.20.0070.00017.98
8.2.10.0040.00418.15
8.2.00.0080.00018.11
8.1.280.0110.01125.92
8.1.270.0040.00420.61
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0090.00019.53
8.1.230.0110.00017.77
8.1.220.0000.00818.16
8.1.210.0040.00418.77
8.1.200.0000.01017.73
8.1.190.0040.00417.60
8.1.180.0060.00320.49
8.1.170.0060.00318.97
8.1.160.0070.00322.31
8.1.150.0030.00518.98
8.1.140.0000.00717.75
8.1.130.0030.00318.21
8.1.120.0040.00417.93
8.1.110.0000.00717.83
8.1.100.0030.00617.65
8.1.90.0040.00417.62
8.1.80.0040.00417.88
8.1.70.0040.00417.85
8.1.60.0060.00317.96
8.1.50.0030.00517.97
8.1.40.0080.00017.74
8.1.30.0090.00017.85
8.1.20.0040.00418.11
8.1.10.0040.00417.90
8.1.00.0020.00517.87
8.0.300.0040.00418.77
8.0.290.0050.00317.00
8.0.280.0040.00418.88
8.0.270.0070.00017.54
8.0.260.0030.00317.21
8.0.250.0020.00517.44
8.0.240.0000.00917.20
8.0.230.0000.00717.29
8.0.220.0040.00417.16
8.0.210.0000.00717.14
8.0.200.0000.00817.47
8.0.190.0070.00017.41
8.0.180.0050.00217.32
8.0.170.0030.00517.43
8.0.160.0050.00217.35
8.0.150.0060.00317.16
8.0.140.0040.00817.19
8.0.130.0060.00013.59
8.0.120.0060.00317.20
8.0.110.0040.00417.30
8.0.100.0000.00717.34
8.0.90.0050.00317.24
8.0.80.0030.01717.28
8.0.70.0070.00017.22
8.0.60.0070.00017.26
8.0.50.0040.00417.34
8.0.30.0090.01117.57
8.0.20.0120.00717.42
8.0.10.0080.00017.30
8.0.00.0110.01117.25
7.4.330.0000.00515.00
7.4.320.0000.00716.80
7.4.300.0000.00716.70
7.4.290.0070.00416.88
7.4.280.0030.00316.89
7.4.270.0040.00417.01
7.4.260.0070.00316.85
7.4.250.0040.00416.86
7.4.240.0030.00416.90
7.4.230.0030.00317.03
7.4.220.0090.01616.85
7.4.210.0100.00816.95
7.4.200.0030.00316.91
7.4.190.0000.00716.83
7.4.160.0120.00416.81
7.4.150.0090.00917.40
7.4.140.0110.01017.86
7.4.130.0080.01016.80
7.4.120.0110.00816.93
7.4.110.0070.01016.85
7.4.100.0130.00516.94
7.4.90.0100.00716.85
7.4.80.0170.00019.39
7.4.70.0070.01016.87
7.4.60.0140.00316.94
7.4.50.0000.00416.86
7.4.40.0040.01222.77
7.4.30.0130.00316.98
7.4.00.0090.00615.06
7.3.330.0050.00013.58
7.3.320.0030.00313.60
7.3.310.0030.00316.79
7.3.300.0030.00316.64
7.3.290.0090.00616.77
7.3.280.0110.00716.65
7.3.270.0100.00717.40
7.3.260.0130.00516.58
7.3.250.0130.00516.71
7.3.240.0130.00316.97
7.3.230.0070.01016.64
7.3.210.0030.01316.92
7.3.200.0080.01219.39
7.3.190.0130.00916.77
7.3.180.0110.00816.70
7.3.170.0110.00516.69
7.3.160.0070.01016.83
7.3.120.0060.00915.11
7.3.10.0130.00316.80
7.3.00.0110.00416.82
7.2.330.0000.01916.70
7.2.320.0070.01717.02
7.2.310.0030.01416.94
7.2.300.0130.00316.91
7.2.290.0060.01316.93
7.2.130.0040.00717.09
7.2.120.0100.00717.18
7.2.110.0030.01317.27
7.2.100.0060.00616.87
7.2.90.0090.00617.05
7.2.80.0060.01017.06
7.2.70.0080.00417.03
7.2.60.0030.01217.23
7.2.50.0100.00617.36
7.2.40.0040.01416.92
7.2.30.0060.00917.26
7.2.20.0070.00416.99
7.2.10.0070.00317.04
7.2.00.0160.00017.13
7.1.250.0090.00015.80
7.1.100.0090.00918.19
7.1.70.0000.00917.34
7.1.60.0170.00719.50
7.1.50.0070.00416.74
7.1.00.0070.03022.55
7.0.200.0030.00916.74
7.0.140.0000.07722.21
7.0.60.0000.07720.04
7.0.50.0000.04318.04
7.0.40.0070.09320.52
7.0.30.0270.08020.21
7.0.20.0370.07720.36
7.0.10.0300.07320.38
7.0.00.0070.04720.37
5.6.280.0070.06721.13
5.6.210.0130.09720.62
5.6.200.0100.05018.31
5.6.190.0030.04020.88
5.6.180.3100.04320.86
5.6.170.0270.04720.77
5.6.160.0130.07720.54
5.6.150.0070.08018.27
5.6.140.0070.07018.37
5.6.130.0070.08018.26
5.6.120.0070.08021.24
5.6.110.0070.08721.28
5.6.100.0130.07721.26
5.6.90.0070.07721.24
5.6.80.0130.07720.70
5.6.70.0200.07720.69
5.5.350.0200.06020.62
5.5.340.0070.04718.22
5.5.330.0130.04320.40
5.5.320.0230.07720.37
5.5.310.0230.07320.39
5.5.300.0100.08318.17
5.5.290.0000.04318.11
5.5.280.0070.06721.08
5.5.270.0170.07320.94
5.5.260.0030.04020.97
5.5.250.0130.07320.77
5.5.240.0000.04320.29
5.4.450.0200.06319.74
5.4.440.0270.06019.54
5.4.430.0300.07019.47
5.4.420.0230.05019.43
5.4.410.0230.07719.23
5.4.400.0270.06019.31
5.4.390.0170.05019.21
5.4.380.0170.04319.04
5.4.370.0200.04719.42
5.4.360.0230.07319.24
5.4.350.0200.04019.24
5.4.340.0200.04319.09
5.4.320.0300.03019.31
5.4.310.0170.05319.24
5.4.300.0270.07019.07
5.4.290.0200.06719.07
5.4.280.0130.04719.27
5.4.270.0330.06719.24
5.4.260.0300.05319.37
5.4.250.0230.07019.30
5.4.240.0200.05319.06
5.4.230.0230.04019.40
5.4.220.0270.07019.30
5.4.210.0330.06019.45
5.4.200.0230.07019.31
5.4.190.0270.06019.36
5.4.180.0200.05319.14
5.4.170.0230.07319.20
5.4.160.0100.04319.44
5.4.150.0130.04019.20
5.4.140.0270.03016.48
5.4.130.0070.04716.43
5.4.120.0100.03716.64
5.4.110.0100.04016.64
5.4.100.0130.03716.49
5.4.90.0170.03316.33
5.4.80.0130.03316.64
5.4.70.0130.03316.40
5.4.60.0130.03316.31
5.4.50.0170.03716.64
5.4.40.0270.03016.48
5.4.30.0170.03716.65
5.4.20.0130.04016.39
5.4.10.0170.04016.47
5.4.00.0100.03715.92
5.3.290.0200.03714.72
5.3.280.0270.04314.65
5.3.270.0130.05714.68
5.3.260.0270.03014.68
5.3.250.0130.04014.82
5.3.240.0200.03714.70
5.3.230.0170.03314.66
5.3.220.0130.03714.67
5.3.210.0170.04314.64
5.3.200.0170.03314.75
5.3.190.0200.03014.69
5.3.180.0100.05014.81
5.3.170.0200.03014.59
5.3.160.0200.03014.80
5.3.150.0170.03314.82
5.3.140.0170.03314.80
5.3.130.0100.04014.75
5.3.120.0130.03714.76
5.3.110.0100.04314.76
5.3.100.0030.04714.08
5.3.90.0100.03714.12
5.3.80.0130.03714.03
5.3.70.0200.02714.27
5.3.60.0170.03014.06
5.3.50.0130.03314.20
5.3.40.0170.03014.00
5.3.30.0170.03013.98
5.3.20.0130.03713.71
5.3.10.0130.04013.67
5.3.00.0130.03313.66
5.2.170.0130.03312.34
5.2.160.0070.03712.34
5.2.150.0170.02312.34
5.2.140.0130.02712.34
5.2.130.0100.03012.34
5.2.120.0070.03312.34
5.2.110.0130.02312.34
5.2.100.0170.03012.34
5.2.90.0070.03012.34
5.2.80.0100.03712.34
5.2.70.0130.02712.34
5.2.60.0100.03012.34
5.2.50.0100.03712.34
5.2.40.0100.03312.34
5.2.30.0200.05312.34
5.2.20.0170.05012.34
5.2.10.0200.05712.34
5.2.00.0200.05312.34
5.1.60.0170.04712.34
5.1.50.0230.03712.34
5.1.40.0170.04712.34
5.1.30.0170.04312.34
5.1.20.0200.03712.34
5.1.10.0130.04012.34
5.1.00.0170.03712.34
5.0.50.0230.03712.34
5.0.40.0100.04312.34
5.0.30.0070.03712.34
5.0.20.0170.04012.34
5.0.10.0100.04312.34
5.0.00.0100.04712.34
4.4.90.0070.01312.34
4.4.80.0070.01312.34
4.4.70.0170.01712.34
4.4.60.0070.02712.34
4.4.50.0100.02012.34
4.4.40.0030.04712.34
4.4.30.0100.03312.34
4.4.20.0070.02712.34
4.4.10.0170.02712.34
4.4.00.0100.05712.34
4.3.110.0130.02312.34
4.3.100.0070.02312.34
4.3.90.0070.02712.34
4.3.80.0100.03012.34
4.3.70.0030.02012.34
4.3.60.0100.03012.34
4.3.50.0130.01712.34
4.3.40.0130.03312.34
4.3.30.0130.03012.34
4.3.20.0030.03012.34
4.3.10.0030.03012.34
4.3.00.0030.03312.34

preferences:
36.96 ms | 401 KiB | 5 Q