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[@id>"1" and @id<"3"]'); 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.0090.00617.25
8.3.50.0120.01017.76
8.3.40.0100.01019.21
8.3.30.0110.00419.18
8.3.20.0000.00819.20
8.3.10.0030.00621.11
8.3.00.0060.00319.88
8.2.180.0150.00316.75
8.2.170.0170.00322.96
8.2.160.0100.00321.70
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0000.00726.16
8.2.120.0080.00019.73
8.2.110.0070.00321.45
8.2.100.0080.00318.41
8.2.90.0040.00419.67
8.2.80.0040.00418.43
8.2.70.0090.00018.00
8.2.60.0040.00418.30
8.2.50.0040.00418.13
8.2.40.0050.00318.66
8.2.30.0050.00418.61
8.2.20.0000.00818.08
8.2.10.0000.00818.20
8.2.00.0040.00418.27
8.1.280.0000.01525.92
8.1.270.0050.00324.66
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0070.00420.95
8.1.230.0040.00821.27
8.1.220.0050.00318.18
8.1.210.0040.00419.26
8.1.200.0060.00317.75
8.1.190.0030.00518.03
8.1.180.0040.00418.10
8.1.170.0000.00819.33
8.1.160.0080.00019.19
8.1.150.0000.00719.11
8.1.140.0030.00617.86
8.1.130.0030.00318.34
8.1.120.0050.00317.80
8.1.110.0040.00417.80
8.1.100.0000.00717.79
8.1.90.0040.00417.77
8.1.80.0040.00417.98
8.1.70.0000.00717.99
8.1.60.0050.00317.87
8.1.50.0080.00018.02
8.1.40.0050.00318.00
8.1.30.0080.00017.93
8.1.20.0050.00318.00
8.1.10.0000.00818.05
8.1.00.0040.00417.79
8.0.300.0070.00020.27
8.0.290.0000.00717.13
8.0.280.0000.00818.81
8.0.270.0070.00017.71
8.0.260.0050.00517.34
8.0.250.0000.00717.39
8.0.240.0030.00317.59
8.0.230.0000.00817.50
8.0.220.0030.00317.29
8.0.210.0070.00017.32
8.0.200.0040.00417.54
8.0.190.0000.00717.50
8.0.180.0050.00217.34
8.0.170.0090.00017.47
8.0.160.0040.00417.46
8.0.150.0060.00317.23
8.0.140.0040.00417.26
8.0.130.0060.00013.96
8.0.120.0050.00317.54
8.0.110.0000.00817.30
8.0.100.0000.00717.36
8.0.90.0000.00817.34
8.0.80.0080.00817.27
8.0.70.0040.00417.39
8.0.60.0040.00417.39
8.0.50.0000.00717.32
8.0.30.0140.00617.58
8.0.20.0070.01217.41
8.0.10.0000.00817.53
8.0.00.0100.01017.32
7.4.330.0000.00513.45
7.4.320.0020.00717.05
7.4.300.0000.01017.02
7.4.290.0000.00717.13
7.4.280.0030.00617.02
7.4.270.0030.00517.15
7.4.260.0000.00613.75
7.4.250.0090.00016.94
7.4.240.0000.00717.03
7.4.230.0070.00016.91
7.4.220.0140.00416.97
7.4.210.0080.00716.97
7.4.200.0000.00716.93
7.4.190.0000.00816.94
7.4.160.0120.00417.08
7.4.150.0090.00817.04
7.4.140.0110.01116.93
7.4.130.0130.00716.92
7.4.120.0150.00516.92
7.4.110.0070.01016.95
7.4.100.0030.01416.87
7.4.90.0060.01216.78
7.4.80.0070.01016.92
7.4.70.0070.01616.89
7.4.60.0100.01316.91
7.4.50.0030.00616.95
7.4.40.0040.00716.79
7.4.30.0030.01316.89
7.4.10.0070.01116.12
7.4.00.0070.01015.78
7.3.330.0000.00613.70
7.3.320.0030.00313.76
7.3.310.0000.00716.83
7.3.300.0070.00016.89
7.3.290.0100.01016.86
7.3.280.0090.00916.81
7.3.270.0140.00416.96
7.3.260.0120.01016.92
7.3.250.0140.00516.94
7.3.240.0060.01016.83
7.3.230.0060.01217.02
7.3.210.0040.01216.96
7.3.200.0040.01819.39
7.3.190.0100.00617.02
7.3.180.0060.00916.69
7.3.170.0160.00016.87
7.3.160.0060.01016.75
7.3.130.0070.00915.94
7.3.120.0050.01015.67
7.3.110.0070.01116.03
7.3.100.0100.00715.91
7.3.90.0040.01215.96
7.3.80.0020.01116.13
7.3.70.0020.00915.94
7.3.60.0070.00916.04
7.3.50.0060.01016.02
7.3.40.0020.01016.04
7.3.30.0100.00815.95
7.3.20.0070.00717.85
7.3.10.0030.01017.74
7.3.00.0050.01017.79
7.2.330.0100.00717.10
7.2.320.0130.00416.94
7.2.310.0170.00916.98
7.2.300.0100.00717.21
7.2.290.0140.00316.75
7.2.260.0040.01616.19
7.2.250.0050.01316.26
7.2.240.0080.00816.05
7.2.230.0050.01316.27
7.2.220.0080.00316.16
7.2.210.0050.00916.26
7.2.200.0080.00416.13
7.2.190.0030.00916.12
7.2.180.0050.00916.30
7.2.170.0070.00616.29
7.2.160.0080.00716.25
7.2.150.0070.00418.07
7.2.140.0100.00318.10
7.2.130.0090.00618.01
7.2.120.0020.01218.12
7.2.110.0080.00918.18
7.2.100.0060.00718.04
7.2.90.0060.00918.16
7.2.80.0060.00817.95
7.2.70.0020.01218.09
7.2.60.0050.00918.17
7.2.50.0060.00618.04
7.2.40.0080.01018.10
7.2.30.0100.00518.20
7.2.20.0080.00718.20
7.2.10.0090.00618.01
7.2.00.0060.00918.67
7.1.330.0060.01017.04
7.1.320.0060.00517.06
7.1.310.0030.00916.84
7.1.300.0040.01016.91
7.1.290.0020.01316.91
7.1.280.0050.00916.88
7.1.270.0070.00616.99
7.1.260.0090.00517.01
7.1.250.0110.00416.80
7.1.240.0070.00617.05
7.1.230.0050.01116.92
7.1.220.0050.01016.89
7.1.210.0040.01116.96
7.1.200.0050.00916.91
7.1.190.0060.00716.92
7.1.180.0020.01016.99
7.1.170.0060.00916.96
7.1.160.0090.00616.85
7.1.150.0050.00916.99
7.1.140.0080.00616.83
7.1.130.0040.00716.99
7.1.120.0080.00517.01
7.1.110.0040.00917.03
7.1.100.0050.00817.45
7.1.90.0030.00617.07
7.1.80.0080.00216.78
7.1.70.0050.00816.99
7.1.60.0100.00617.74
7.1.50.0030.01417.08
7.1.40.0060.00816.91
7.1.30.0050.00916.81
7.1.20.0070.00816.97
7.1.10.0040.00916.88
7.1.00.0050.01518.81
7.0.330.0060.00616.65
7.0.320.0040.00916.71
7.0.310.0070.00816.54
7.0.300.0030.00816.43
7.0.290.0050.00716.65
7.0.280.0120.00216.71
7.0.270.0060.00816.58
7.0.260.0070.00516.71
7.0.250.0040.00816.67
7.0.240.0040.00916.70
7.0.230.0030.01016.64
7.0.220.0010.01116.73
7.0.210.0090.00616.62
7.0.200.0030.00816.64
7.0.190.0060.00516.54
7.0.180.0080.00616.67
7.0.170.0060.00716.77
7.0.160.0080.00516.51
7.0.150.0050.00816.84
7.0.140.0060.02918.51
7.0.130.0060.00816.69
7.0.120.0080.02118.46
7.0.110.0070.00516.63
7.0.100.0030.00616.67
7.0.90.0020.01016.77
7.0.80.0050.00816.63
7.0.70.0100.00216.44
7.0.60.0120.02417.94
7.0.50.0050.02617.16
7.0.40.0020.02316.48
7.0.30.0050.02516.64
7.0.20.0060.02016.57
7.0.10.0070.01816.59
7.0.00.0080.01816.50
5.6.400.0090.00615.59
5.6.390.0040.00915.59
5.6.380.0050.01115.33
5.6.370.0040.00915.57
5.6.360.0080.00815.57
5.6.350.0060.00715.62
5.6.340.0060.01015.78
5.6.330.0100.00515.59
5.6.320.0080.00715.66
5.6.310.0080.00815.64
5.6.300.0090.00315.38
5.6.290.0060.00815.59
5.6.280.0100.02617.55
5.6.270.0070.00715.59
5.6.260.0030.00815.50
5.6.250.0030.00615.56
5.6.240.0050.00715.46
5.6.230.0100.00515.51
5.6.220.0070.00715.63
5.6.210.0080.03117.39
5.6.200.0070.03316.41
5.6.190.0040.02317.22
5.6.180.0060.03417.30
5.6.170.0070.03217.21
5.6.160.0070.02117.25
5.6.150.0060.02317.06
5.6.140.0030.02617.13
5.6.130.0080.03117.18
5.6.120.0050.03117.13
5.6.110.0040.03517.20
5.6.100.0040.03617.15
5.6.90.0080.03317.11
5.6.80.0050.03716.86
5.6.70.0100.03116.98
5.6.60.0090.02116.93
5.6.50.0080.02017.01
5.6.40.0080.02016.96
5.6.30.0080.03216.98
5.6.20.0090.02117.03
5.6.10.0060.02416.89
5.6.00.0060.03116.86
5.5.380.0070.00515.42
5.5.370.0040.00715.55
5.5.360.0080.00815.17
5.5.350.0020.01717.21
5.5.340.0030.03116.27
5.5.330.0050.02317.19
5.5.320.0070.01616.95
5.5.310.0040.02417.16
5.5.300.0060.02517.09
5.5.290.0040.02717.18
5.5.280.0050.04017.00
5.5.270.0080.03817.03
5.5.260.0090.02217.16
5.5.250.0070.03617.03
5.5.240.0060.03416.77
5.5.230.0050.03416.79
5.5.220.0130.02716.90
5.5.210.0060.02616.95
5.5.200.0060.02716.62
5.5.190.0050.02416.86
5.5.180.0040.03416.71
5.5.170.0050.00715.28
5.5.160.0020.02416.87
5.5.150.0090.01716.74
5.5.140.0060.01816.83
5.5.130.0030.02216.89
5.5.120.0070.02716.98
5.5.110.0050.02117.04
5.5.100.0080.01916.88
5.5.90.0040.01916.72
5.5.80.0060.01916.84
5.5.70.0060.02916.67
5.5.60.0080.02116.80
5.5.50.0030.02116.71
5.5.40.0070.03116.68
5.5.30.0050.02216.65
5.5.20.0090.02216.79
5.5.10.0090.02616.61
5.5.00.0030.02316.88
5.4.450.0030.02214.77
5.4.440.0030.03414.52
5.4.430.0040.03414.77
5.4.420.0050.03114.77
5.4.410.0050.03214.53
5.4.400.0050.02014.56
5.4.390.0030.03314.59
5.4.380.0070.01914.57
5.4.370.0050.01514.65
5.4.360.0050.03314.45
5.4.350.0100.02414.43
5.4.340.0030.02014.42
5.4.330.0040.00712.01
5.4.320.0050.03114.50
5.4.310.0080.02214.46
5.4.300.0030.03314.43
5.4.290.0060.01514.48
5.4.280.0070.02914.61
5.4.270.0090.02214.44
5.4.260.0040.03114.52
5.4.250.0050.01914.53
5.4.240.0030.03414.67
5.4.230.0080.02114.53
5.4.220.0080.01814.46
5.4.210.0020.01914.61
5.4.200.0120.02514.69
5.4.190.0070.02914.61
5.4.180.0020.03014.57
5.4.170.0060.01714.45
5.4.160.0080.01514.53
5.4.150.0070.01714.51
5.4.140.0030.01913.54
5.4.130.0050.02813.73
5.4.120.0030.02713.65
5.4.110.0070.02513.49
5.4.100.0050.02213.59
5.4.90.0040.03113.65
5.4.80.0060.01513.61
5.4.70.0070.02513.67
5.4.60.0060.02513.67
5.4.50.0030.03013.68
5.4.40.0020.01913.70
5.4.30.0050.02613.69
5.4.20.0060.01713.64
5.4.10.0040.02113.66
5.4.00.0040.02113.49
5.3.290.0030.02713.15
5.3.280.0070.01613.00
5.3.270.0090.02213.06
5.3.260.0030.01913.08
5.3.250.0050.02712.94
5.3.240.0030.02512.88
5.3.230.0050.02612.95
5.3.220.0070.01413.00
5.3.210.0090.02612.94
5.3.200.0060.02813.01
5.3.190.0060.01913.06
5.3.180.0030.01712.99
5.3.170.0050.02212.99
5.3.160.0060.02613.02
5.3.150.0070.02212.99
5.3.140.0050.02912.97
5.3.130.0030.03012.99
5.3.120.0020.03213.00
5.3.110.0050.02512.91
5.3.100.0060.02712.91
5.3.90.0020.02512.88
5.3.80.0030.02012.81
5.3.70.0020.03112.72
5.3.60.0060.02012.68
5.3.50.0020.02112.65
5.3.40.0050.01812.77
5.3.30.0020.01612.76
5.3.20.0030.01912.78
5.3.10.0070.01712.62
5.3.00.0020.02112.66
5.2.170.0030.04311.34
5.2.160.0070.04011.57
5.2.150.0030.06711.36
5.2.140.0070.03011.33
5.2.130.0000.03711.42
5.2.120.0000.04311.26
5.2.110.0030.03011.44
5.2.100.0000.03311.41
5.2.90.0070.02711.39
5.2.80.0000.04011.43
5.2.70.0070.03011.38
5.2.60.0000.03711.30
5.2.50.0030.03711.34
5.2.40.0070.05311.17
5.2.30.0100.05711.19
5.2.20.0100.06011.24
5.2.10.0030.02711.31
5.2.00.0000.03010.96
5.1.60.0030.02310.27
5.1.50.0000.02710.19
5.1.40.0030.02710.23
5.1.30.0000.02710.61
5.1.20.0030.02310.70
5.1.10.0030.02310.48
5.1.00.0000.02710.44
5.0.50.0000.0208.80
5.0.40.0030.0178.80
5.0.30.0000.0308.66
5.0.20.0030.0178.50
5.0.10.0000.0208.56
5.0.00.0000.0308.59
4.4.90.0000.0206.64
4.4.80.0070.0336.64
4.4.70.0030.0336.64
4.4.60.0030.0236.64
4.4.50.0030.0176.64
4.4.40.0000.0236.64
4.4.30.0000.0176.64
4.4.20.0000.0176.64
4.4.10.0030.0136.64
4.4.00.0000.0276.64
4.3.110.0030.0136.64
4.3.100.0000.0176.64
4.3.90.0030.0136.64
4.3.80.0000.0236.64
4.3.70.0030.0236.64
4.3.60.0000.0176.64
4.3.50.0000.0136.64
4.3.40.0000.0236.64
4.3.30.0030.0136.64
4.3.20.0100.0136.64
4.3.10.0000.0136.64
4.3.00.0030.0136.64

preferences:
42.64 ms | 401 KiB | 5 Q