3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timeTarget = 0.05; // 50 milliseconds $cost = 8; 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.0030.10814.72
7.4.00.0050.10414.88
7.3.130.0050.10814.55
7.3.120.0050.10414.97
7.3.110.0080.10614.81
7.3.100.0100.09714.84
7.3.90.0070.09914.72
7.3.80.0030.10015.04
7.3.70.0000.10614.83
7.3.60.0060.10814.86
7.3.50.0030.10214.73
7.3.40.0030.10014.89
7.3.30.0050.10214.86
7.3.20.0020.10416.69
7.3.10.0050.09816.73
7.3.00.0090.09516.64
7.2.260.0100.10314.99
7.2.250.0080.10514.95
7.2.240.0050.09915.14
7.2.230.0100.10315.12
7.2.220.0050.10515.11
7.2.210.0080.09514.84
7.2.200.0020.10415.01
7.2.190.0020.10315.03
7.2.180.0030.10215.04
7.2.170.0050.10614.99
7.2.160.0020.10614.95
7.2.150.0030.10117.00
7.2.140.0020.10216.98
7.2.130.0060.10016.98
7.2.120.0060.10116.97
7.2.110.0060.09816.89
7.2.100.0040.10117.00
7.2.90.0030.10017.02
7.2.80.0070.09916.99
7.2.70.0090.09616.94
7.2.60.0030.09916.95
7.2.50.0040.10017.01
7.2.40.0040.10416.92
7.2.30.0040.10216.91
7.2.20.0080.09816.91
7.2.10.0040.10116.87
7.2.00.0020.10017.57
7.1.330.0020.10515.65
7.1.320.0030.10115.79
7.1.310.0020.10415.92
7.1.300.0030.10315.74
7.1.290.0070.09815.90
7.1.280.0000.10615.92
7.1.270.0020.10315.78
7.1.260.0050.09815.77
7.1.250.0080.09915.86
7.1.240.0030.09815.68
7.1.230.0050.09715.81
7.1.220.0000.10615.72
7.1.210.0030.10015.73
7.1.200.0050.10315.83
7.1.190.0050.10015.79
7.1.180.0050.10015.65
7.1.170.0070.09615.98
7.1.160.0030.10115.87
7.1.150.0050.09915.86
7.1.140.0070.10215.93
7.1.130.0020.10115.72
7.1.120.0030.10415.60
7.1.110.0050.09615.88
7.1.100.0070.10115.71
7.1.90.0080.10015.90
7.1.80.0070.09915.85
7.1.70.0060.09416.24
7.1.60.0100.09816.34
7.1.50.0070.08916.16
7.1.40.0080.09215.93
7.1.30.0010.11016.16
7.1.20.0020.10915.96
7.1.10.0060.09916.06
7.1.00.0060.09616.22
7.0.330.0050.10015.48
7.0.320.0020.10315.45
7.0.310.0050.10015.33
7.0.300.0070.09515.36
7.0.290.0050.09615.56
7.0.280.0070.09815.50
7.0.270.0030.10115.28
7.0.260.0070.09615.38
7.0.250.0020.10215.46
7.0.240.0020.10715.58
7.0.230.0070.10315.45
7.0.220.0030.10015.47
7.0.210.0070.09515.54
7.0.200.0040.09315.79
7.0.190.0010.10415.93
7.0.180.0040.09215.76
7.0.170.0030.09115.67
7.0.160.0040.09815.73
7.0.150.0030.10015.70
7.0.140.0020.10115.76
7.0.130.0070.09215.88
7.0.120.0010.10115.89
7.0.110.0030.10115.74
7.0.100.0020.09915.68
7.0.90.0030.10115.85
7.0.80.0060.09615.85
7.0.70.0040.10115.66
7.0.60.0020.09415.73
7.0.50.0030.09815.75
7.0.40.0070.09714.24
7.0.30.0090.09614.31
7.0.20.0050.09814.25
7.0.10.0050.09714.31
7.0.00.0010.10014.27
5.6.400.0030.10214.54
5.6.390.0050.10114.36
5.6.380.0080.09814.21
5.6.370.0020.10614.49
5.6.360.0050.09914.20
5.6.350.0080.09814.26
5.6.340.0050.09814.42
5.6.330.0030.10114.40
5.6.320.0120.09614.28
5.6.310.0030.10314.49
5.6.300.0030.11416.54
5.6.290.0020.11616.56
5.6.280.0090.10916.57
5.6.270.0080.11116.57
5.6.260.0280.11616.59
5.6.250.0090.10516.50
5.6.240.0070.10916.65
5.6.230.0040.11516.57
5.6.220.0090.11116.69
5.6.210.0030.11416.49
5.6.200.0040.11516.45
5.6.190.0070.10916.52
5.6.180.0080.10616.38
5.6.170.0040.11116.43
5.6.160.0080.10916.56
5.6.150.0030.11116.43
5.6.140.0080.11016.56
5.6.130.0030.11116.56
5.6.120.0030.12416.51
5.6.110.0040.11416.52
5.6.100.0080.10916.71
5.6.90.0030.11416.52
5.6.80.0020.11416.13
5.6.70.0060.10716.24
5.6.60.0080.10816.30
5.6.50.0060.11016.15
5.6.40.0030.11016.29
5.6.30.0030.11116.25
5.6.20.0060.10816.17
5.6.10.0060.11216.10
5.6.00.0060.11216.24
5.5.380.0030.13517.63
5.5.370.0030.13217.48
5.5.360.0430.11317.46
5.5.350.0130.13217.66
5.5.340.0000.13818.07
5.5.330.0000.13618.06
5.5.320.0000.13918.09
5.5.310.0100.13117.86
5.5.300.0030.17118.02
5.5.290.0100.12317.95
5.5.280.0030.13418.02
5.5.270.0030.13017.97
5.5.260.0030.13317.96
5.5.250.0030.13117.75
5.5.240.0030.13017.48
5.5.230.0030.12717.51
5.5.220.0070.12917.40
5.5.210.0030.13117.12
5.5.200.0030.12917.21
5.5.190.0070.15717.05
5.5.180.0030.13917.19
5.5.160.0070.13217.32
5.5.150.0070.12617.29
5.5.140.0170.11917.46
5.5.130.0030.12917.41
5.5.120.0000.13417.32
5.5.110.0070.18717.20
5.5.100.0030.13517.29
5.5.90.0000.14517.21
5.5.80.0000.13517.21
5.5.70.0030.20017.27
5.5.60.0000.21417.33
5.5.50.0100.15217.33
5.5.40.0000.13817.33
5.5.30.0170.16916.94
5.5.20.0030.13017.09
5.5.10.0100.13217.09
5.5.00.0070.12617.20
5.4.450.0000.04419.45
5.4.440.0030.04219.50
5.4.430.0000.04119.24
5.4.420.0070.04219.21
5.4.410.0030.04319.08
5.4.400.0070.03319.10
5.4.390.0100.04818.88
5.4.380.0070.03519.14
5.4.370.0120.03119.01
5.4.360.0030.04518.90
5.4.350.0070.03219.05
5.4.340.0130.06419.02
5.4.320.0060.03818.88
5.4.310.0030.04719.07
5.4.300.0000.03919.07
5.4.290.0060.04118.85
5.4.280.0030.03718.97
5.4.270.0030.05119.16
5.4.260.0030.05719.07
5.4.250.0030.04019.00
5.4.240.0030.05919.00
5.4.230.0000.03918.82
5.4.220.0070.03319.16
5.4.210.0090.04318.98
5.4.200.0060.05818.97
5.4.190.0070.04918.97
5.4.180.0060.05418.92
5.4.170.0090.03719.13
5.4.160.0030.07119.15
5.4.150.0100.06618.96
5.4.140.0000.05216.61
5.4.130.0030.03716.62
5.4.120.0090.03116.47
5.4.110.0030.04116.57
5.4.100.0030.03916.59
5.4.90.0070.03616.58
5.4.80.0040.03716.62
5.4.70.0030.03816.52
5.4.60.0030.03416.59
5.4.50.0060.03216.61
5.4.40.0030.03516.54
5.4.30.0060.03016.58
5.4.20.0140.04116.40
5.4.10.0030.07316.54
5.4.00.0060.03515.80
5.3.290.0070.04715.80
5.3.280.0000.04415.80
5.3.270.0040.04015.80
5.3.260.0000.04415.80
5.3.250.0060.04115.80
5.3.240.0000.04515.80
5.3.230.0030.07215.80
5.3.220.0000.04415.80
5.3.210.0030.03715.80
5.3.200.0060.03815.80
5.3.190.0000.03915.80
5.3.180.0070.03315.80
5.3.170.0040.04815.80
5.3.160.0030.04415.80
5.3.150.0000.04415.80
5.3.140.0040.03515.80
5.3.130.0070.03315.80
5.3.120.0030.03915.80
5.3.110.0060.06115.80
5.3.100.0030.03715.80
5.3.90.0030.03715.80
5.3.80.0100.04015.80
5.3.70.0040.04015.80
5.3.60.0000.03915.80
5.3.50.0040.03515.80
5.3.40.0040.03715.80
5.3.30.0030.03815.80
5.3.20.0040.03615.80
5.3.10.0030.03615.80
5.3.00.0000.03915.80
5.2.170.0030.03115.80
5.2.160.0030.03215.80
5.2.150.0000.03315.80
5.2.140.0030.03115.80
5.2.130.0030.02715.80
5.2.120.0000.03015.80
5.2.110.0000.02915.80
5.2.100.0030.03015.80
5.2.90.0030.02715.80
5.2.80.0070.02815.80
5.2.70.0000.03815.80
5.2.60.0000.03315.80
5.2.50.0040.03015.80
5.2.40.0060.02415.80
5.2.30.0040.03215.80
5.2.20.0060.02515.80
5.2.10.0000.03615.80
5.2.00.0070.03815.80
5.1.60.0040.02515.80
5.1.50.0040.02215.80
5.1.40.0090.03115.80
5.1.30.0060.02515.80
5.1.20.0030.02815.80
5.1.10.0000.02815.80
5.1.00.0040.02515.80
5.0.50.0000.02215.80
5.0.40.0030.04115.80
5.0.30.0070.05215.80
5.0.20.0000.02315.80
5.0.10.0000.02515.80
5.0.00.0000.03315.80
4.4.90.0000.01815.80
4.4.80.0000.01815.80
4.4.70.0030.01315.80
4.4.60.0000.01715.80
4.4.50.0000.01715.80
4.4.40.0000.02615.80
4.4.30.0060.01115.80
4.4.20.0000.01815.80
4.4.10.0030.01515.80
4.4.00.0030.02315.80
4.3.110.0030.02115.80
4.3.100.0000.02115.80
4.3.90.0000.01615.80
4.3.80.0070.02315.80
4.3.70.0000.01915.80
4.3.60.0000.01515.80
4.3.50.0000.01815.80
4.3.40.0000.02715.80
4.3.30.0030.01615.80
4.3.20.0030.02015.80
4.3.10.0030.03315.80
4.3.00.0000.02215.80

preferences:
37.66 ms | 401 KiB | 5 Q