3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function takesStrings(string $key, string $value): void { foreach ([$key => $value] as $new_key => $new_value) { echo strlen($new_key) + strlen($new_value); } } takesStrings("1", "a");

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.0130.00918.51
8.3.50.0030.01316.46
8.3.40.0110.00318.91
8.3.30.0110.00318.75
8.3.20.0000.00824.18
8.3.10.0080.00024.66
8.3.00.0070.00026.16
8.2.180.0110.00725.92
8.2.170.0000.01418.96
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0060.01319.96
8.2.110.0000.01122.12
8.2.100.0040.00719.27
8.2.90.0070.00019.25
8.2.80.0050.00319.41
8.2.70.0060.00317.50
8.2.60.0050.00318.03
8.2.50.0030.00518.07
8.2.40.0080.00418.34
8.2.30.0020.00518.12
8.2.20.0050.00218.03
8.2.10.0040.00419.29
8.2.00.0070.00019.22
8.1.280.0110.00425.92
8.1.270.0050.00223.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00023.70
8.1.230.0090.00319.08
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0090.00017.36
8.1.190.0040.00417.48
8.1.180.0060.00318.10
8.1.170.0040.00418.37
8.1.160.0040.00418.85
8.1.150.0030.00518.93
8.1.140.0050.00218.80
8.1.130.0030.00320.07
8.1.120.0050.00317.49
8.1.110.0040.00417.43
8.1.100.0020.00517.47
8.1.90.0030.00517.36
8.1.80.0000.00717.33
8.1.70.0000.00817.46
8.1.60.0000.00817.61
8.1.50.0040.00417.52
8.1.40.0040.00717.54
8.1.30.0000.00817.55
8.1.20.0040.00417.53
8.1.10.0080.00017.59
8.1.00.0030.00617.38
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0000.00718.39
8.0.270.0000.00718.06
8.0.260.0000.00718.38
8.0.250.0040.00416.92
8.0.240.0030.00317.05
8.0.230.0000.00716.96
8.0.220.0080.00016.94
8.0.210.0000.00716.95
8.0.200.0000.00717.00
8.0.190.0040.00416.88
8.0.180.0070.00016.97
8.0.170.0000.00817.00
8.0.160.0000.00716.97
8.0.150.0020.00516.90
8.0.140.0000.00716.79
8.0.130.0050.00013.35
8.0.120.0000.00816.88
8.0.110.0030.00616.95
8.0.100.0000.00716.99
8.0.90.0040.00416.93
8.0.80.0070.00716.93
8.0.70.0070.00016.78
8.0.60.0000.00816.82
8.0.50.0020.00516.82
8.0.30.0090.00716.83
8.0.20.0100.00616.88
8.0.10.0150.00917.02
8.0.00.0160.00417.00
7.4.330.0000.00515.55
7.4.320.0000.00616.55
7.4.300.0030.00316.40
7.4.290.0050.00416.56
7.4.280.0070.00316.48
7.4.270.0030.00316.61
7.4.260.0050.00013.31
7.4.250.0030.00316.57
7.4.240.0020.00516.53
7.4.230.0000.00916.60
7.4.220.0020.00516.49
7.4.210.0050.00916.49
7.4.200.0000.00716.35
7.4.160.0060.00916.58
7.4.150.0060.00916.48
7.4.140.0150.00616.42
7.4.130.0100.00616.30
7.4.120.0070.01116.25
7.4.110.0040.01116.55
7.4.100.0000.01416.48
7.4.90.0060.00916.57
7.4.80.0040.00916.46
7.4.70.0070.00716.44
7.4.60.0070.00716.35
7.4.50.0070.01016.30
7.4.40.0130.00316.47
7.4.30.0120.00416.49
7.4.20.0120.00316.26
7.4.10.0060.00916.46
7.4.00.0030.01316.40
7.3.330.0030.00316.23
7.3.320.0080.00013.14
7.3.310.0000.00716.46
7.3.300.0070.00016.23
7.3.290.0120.00216.32
7.3.270.0060.01216.36
7.3.260.0090.01316.34
7.3.250.0080.00816.29
7.3.240.0060.00916.30
7.3.230.0070.00716.34
7.3.220.0030.01016.23
7.3.210.0110.00316.17
7.3.200.0100.00316.20
7.3.190.0030.01016.23
7.3.180.0110.00716.28
7.3.170.0110.00716.25
7.3.160.0060.00816.20
7.3.150.0100.00316.19
7.3.140.0140.00016.23
7.3.130.0000.01316.25
7.3.120.0100.01016.21
7.3.110.0120.00316.16
7.3.100.0130.00316.17
7.3.90.0040.01016.37
7.3.80.0110.00416.28
7.3.70.0030.01016.28
7.3.60.0070.00716.34
7.3.50.0100.00316.45
7.3.40.0070.01016.37
7.3.30.0040.01116.40
7.3.20.0270.01016.35
7.3.10.0060.00816.33
7.3.00.0050.00916.40

preferences:
36.35 ms | 400 KiB | 5 Q