3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This code will benchmark your server to determine how high of a cost you can * afford. You want to set the highest cost that you can without slowing down * you server too much. 10 is a good baseline, and more is good if your servers * are fast enough. */ $timeTarget = 0.2; $cost = 9; do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); } while (($end - $start) < $timeTarget); echo "Appropriate Cost Found: " . $cost . "\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)
7.4.10.0100.43614.95
7.4.00.0030.45714.96
7.3.130.0070.44115.02
7.3.120.0030.45814.83
7.3.110.0070.43114.89
7.3.100.0030.43214.63
7.3.90.0100.44214.98
7.3.80.0000.44314.75
7.3.70.0070.43614.87
7.3.60.0030.43414.95
7.3.50.0070.42514.72
7.3.40.0000.44414.81
7.3.30.0000.43714.73
7.3.20.0070.42616.72
7.3.10.0030.43316.70
7.3.00.0100.44016.74
7.2.260.0030.45914.90
7.2.250.0130.44815.21
7.2.240.0100.44115.01
7.2.230.0030.44414.75
7.2.220.0100.44114.96
7.2.210.0130.42115.12
7.2.200.0030.45615.13
7.2.190.0070.43615.10
7.2.180.0000.43714.93
7.2.170.0000.43314.86
7.2.160.0030.44015.19
7.2.150.0070.43817.00
7.2.140.0070.41816.77
7.2.130.0160.42916.90
7.2.120.0070.43116.78
7.2.110.0000.42916.77
7.2.100.0100.42517.03
7.2.90.0030.43616.60
7.2.80.0000.43616.91
7.2.70.0070.43917.08
7.2.60.0030.44116.96
7.2.50.0100.42416.95
7.2.40.0130.42817.03
7.2.30.0030.44117.09
7.2.20.0030.42417.13
7.2.10.0030.44117.04
7.2.00.0070.43016.75
7.1.330.0000.43615.91
7.1.320.0030.44915.86
7.1.310.0030.43515.96
7.1.300.0070.44715.76
7.1.290.0000.43915.88
7.1.280.0030.44715.84
7.1.270.0000.44215.81
7.1.260.0000.44915.66
7.1.250.0070.43616.02
7.1.240.0100.43115.99
7.1.230.0030.43215.93
7.1.220.0030.44515.72
7.1.210.0070.43015.83
7.1.200.0070.43315.90
7.1.190.0000.42015.96
7.1.180.0030.43315.86
7.1.170.0030.43715.54
7.1.160.0030.43515.88
7.1.150.0000.45215.82
7.1.140.0000.43615.94
7.1.130.0030.42816.06
7.1.120.0070.44015.68
7.1.110.0070.42015.85
7.1.100.0100.43515.82
7.1.90.0030.43915.63
7.1.80.0070.43515.76
7.1.70.0050.43316.54
7.1.60.0080.44617.81
7.1.50.0080.45316.33
7.1.40.0030.43215.87
7.1.30.0030.43115.82
7.1.20.0030.43315.75
7.1.10.0030.43115.95
7.1.00.0050.45719.14
7.0.330.0030.44115.32
7.0.320.0070.43315.14
7.0.310.0030.42815.57
7.0.300.0030.44115.41
7.0.290.0030.42815.07
7.0.280.0070.43015.07
7.0.270.0030.42615.44
7.0.260.0070.43415.32
7.0.250.0030.43915.61
7.0.240.0030.44115.45
7.0.230.0070.43315.33
7.0.220.0030.44515.58
7.0.210.0030.43715.39
7.0.200.0770.44616.13
7.0.190.0000.43715.40
7.0.180.0000.44215.49
7.0.170.0030.41915.46
7.0.160.0070.43915.35
7.0.150.0030.44015.52
7.0.140.0030.46418.88
7.0.130.0070.43415.45
7.0.120.0030.42115.58
7.0.110.0000.43915.50
7.0.100.0070.42515.48
7.0.90.0070.43915.47
7.0.80.0070.42615.43
7.0.70.0000.43515.38
7.0.60.0080.46517.67
7.0.50.0070.45116.79
7.0.40.0020.45616.91
7.0.30.0120.45516.80
7.0.20.0120.46216.80
7.0.10.0000.45716.89
7.0.00.0120.44916.80
5.6.400.0070.43714.31
5.6.390.0030.43814.32
5.6.380.0000.44814.37
5.6.370.0030.43014.73
5.6.360.0070.42014.50
5.6.350.0030.44214.24
5.6.340.0070.42714.34
5.6.330.0030.43514.70
5.6.320.0030.43214.16
5.6.310.0000.43514.00
5.6.300.0030.44113.89
5.6.290.0030.43914.12
5.6.280.0030.47717.60
5.6.270.0000.44014.65
5.6.260.0100.42914.45
5.6.250.0070.41714.23
5.6.240.0030.42614.43
5.6.230.0100.43214.32
5.6.220.0070.43614.11
5.6.210.0030.47917.32
5.6.200.0030.47516.13
5.6.190.0070.44717.39
5.6.180.0200.46817.31
5.6.170.0170.45517.46
5.6.160.0070.47817.30
5.6.150.0050.46016.25
5.6.140.0070.48516.23
5.6.130.0070.44916.21
5.6.120.0100.50617.60
5.6.110.0050.47617.64
5.6.100.0070.46817.68
5.6.90.0070.46517.59
5.6.80.0050.45017.39
5.6.70.0030.42914.23
5.6.60.0030.43714.08
5.6.50.0030.43114.19
5.6.40.0070.42514.28
5.6.30.0130.42813.98
5.6.20.0030.42214.14
5.6.10.0070.43314.34
5.6.00.0130.42714.13
5.5.380.0030.43914.30
5.5.370.0030.43414.11
5.5.360.0070.42214.06
5.5.350.0030.47717.34
5.5.340.0050.44816.18
5.5.330.0120.44217.20
5.5.320.0130.45617.11
5.5.310.0200.47717.28
5.5.300.0050.47416.26
5.5.290.0050.45516.24
5.5.280.0070.47617.47
5.5.270.0050.47917.53
5.5.260.0030.47817.54
5.5.250.0100.48317.42
5.5.240.0070.41017.26
5.5.230.0070.43514.38
5.5.220.0100.42914.11
5.5.210.0070.43714.18
5.5.200.0070.41614.19
5.5.190.0070.42014.34
5.5.180.0100.42314.47
5.5.170.0030.42714.42
5.5.160.0000.44114.21
5.5.150.0070.41814.09
5.5.140.0030.42114.41
5.5.130.0100.42214.37
5.5.120.0030.43214.18
5.5.110.0100.42614.38
5.5.100.0070.41714.19
5.5.90.0000.43714.26
5.5.80.0030.42114.04
5.5.70.0000.43314.33
5.5.60.0100.43014.22
5.5.50.0030.43114.27
5.5.40.0000.42314.16
5.5.30.0030.43113.96
5.5.20.0070.42114.31
5.5.10.0030.42513.90
5.5.00.0030.42213.93
5.4.450.0330.02815.87
5.4.440.0470.02815.92
5.4.430.0510.02615.86
5.4.420.0470.02515.85
5.4.410.0310.03415.68
5.4.400.0050.03315.76
5.4.390.0300.03215.77
5.4.380.0150.02815.48
5.4.370.0050.03115.48
5.4.360.0030.03215.51
5.4.350.0040.02012.12
5.4.340.0020.02212.12
5.4.330.0000.00512.26
5.4.320.0040.01912.36
5.4.310.0070.02312.36
5.4.300.0060.01912.36
5.4.290.0020.02312.36
5.4.280.0060.01812.31
5.4.270.0040.02012.30
5.4.260.0030.02312.30
5.4.250.0050.03015.60
5.4.240.0130.03215.54
5.4.230.0050.02715.52
5.4.220.0050.03015.55
5.4.210.0050.02715.56
5.4.200.0070.02515.57
5.4.190.0030.02815.52
5.4.180.0070.02515.47
5.4.170.0030.03015.61
5.4.160.0050.02715.41
5.4.150.0070.02515.56
5.4.140.0050.02714.33
5.4.130.0110.02814.37
5.4.120.0050.02814.37
5.4.110.0030.03014.31
5.4.100.0050.02614.20
5.4.90.0120.02014.22
5.4.80.0070.02514.31
5.4.70.0080.02314.34
5.4.60.0050.02814.21
5.4.50.0040.03114.27
5.4.40.0050.03014.28
5.4.30.0000.03314.20
5.4.20.0070.02714.20
5.4.10.0050.02914.26
5.4.00.0090.02914.08
5.3.290.0060.02212.53
5.3.280.0060.02513.44
5.3.270.0070.02613.45
5.3.260.0050.02813.36
5.3.250.0020.02813.44
5.3.240.0050.02813.36
5.3.230.0030.02913.44
5.3.220.0050.03013.35
5.3.210.0000.03113.30
5.3.200.0030.02613.44
5.3.190.0000.03113.41
5.3.180.0040.02913.30
5.3.170.0030.02913.37
5.3.160.0100.02313.46
5.3.150.0050.02713.42
5.3.140.0070.02313.34
5.3.130.0000.03313.35
5.3.120.0010.03113.35
5.3.110.0030.02813.41
5.3.100.0080.02513.08
5.3.90.0040.02713.06
5.3.80.0050.02813.09
5.3.70.0100.02413.12
5.3.60.0080.02513.05
5.3.50.0050.02613.16
5.3.40.0000.03512.96
5.3.30.0070.02513.09
5.3.20.0060.02812.83
5.3.10.0120.03013.03
5.3.00.0050.02812.80
5.2.170.0030.04311.06
5.2.160.0100.03311.06
5.2.150.0100.03310.98
5.2.140.0100.03711.06
5.2.130.0070.03711.10
5.2.120.0030.04011.11
5.2.110.0030.06011.13
5.2.100.0030.03711.07
5.2.90.0030.04011.01
5.2.80.0070.04011.01
5.2.70.0070.03711.09
5.2.60.0030.04010.98
5.2.50.0100.03311.13
5.2.40.0100.03711.01
5.2.30.0100.03311.07
5.2.20.0000.04310.96
5.2.10.0100.03010.70
5.2.00.0070.04010.65
5.1.60.0070.03010.05
5.1.50.0070.0309.93
5.1.40.0030.0339.86
5.1.30.0030.03710.09
5.1.20.0000.04310.29
5.1.10.0130.02310.16
5.1.00.0000.04010.26
5.0.50.0070.0378.60
5.0.40.0070.0238.60
5.0.30.0000.0478.37
5.0.20.0070.0238.19
5.0.10.0030.0278.36
5.0.00.0030.0408.39
4.4.90.0000.0235.80
4.4.80.0070.0175.79
4.4.70.0030.0205.84
4.4.60.0000.0235.78
4.4.50.0000.0275.81
4.4.40.0000.0335.78
4.4.30.0030.0205.78
4.4.20.0030.0205.82
4.4.10.0000.0235.82
4.4.00.0030.0305.78
4.3.110.0030.0205.78
4.3.100.0000.0235.78
4.3.90.0030.0205.78
4.3.80.0030.0305.78
4.3.70.0030.0175.78
4.3.60.0070.0175.78
4.3.50.0030.0205.78
4.3.40.0000.0335.78
4.3.30.0000.0235.78
4.3.20.0070.0175.78
4.3.10.0000.0205.78
4.3.00.0130.0278.11

preferences:
37.45 ms | 401 KiB | 5 Q