3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timeTarget = 0.2; $cost = 9; do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); var_dump([$cost, $end-$start]); } 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.82
7.4.00.0030.42914.87
7.3.130.0130.44915.12
7.3.120.0130.44715.05
7.3.110.0070.45414.72
7.3.100.0070.44314.52
7.3.90.0100.43014.63
7.3.80.0070.44214.84
7.3.70.0000.44714.98
7.3.60.0030.44714.93
7.3.50.0030.43814.61
7.3.40.0070.43514.58
7.3.30.0070.42314.91
7.3.20.0030.43616.81
7.3.10.0070.43016.90
7.3.00.0030.43116.63
7.2.260.0130.44714.96
7.2.250.0030.45714.72
7.2.240.0070.44215.24
7.2.230.0100.42914.97
7.2.220.0070.45115.05
7.2.210.0070.43315.23
7.2.200.0000.42814.98
7.2.190.0030.43715.18
7.2.180.0030.43314.77
7.2.170.0100.43614.83
7.2.160.0000.44015.12
7.2.150.0070.44217.09
7.2.140.0030.42117.01
7.2.130.0070.43717.00
7.2.120.0030.43317.05
7.2.110.0100.43816.95
7.2.100.0070.43916.85
7.2.90.0000.42717.04
7.2.80.0070.42916.68
7.2.70.0070.44716.68
7.2.60.0000.43617.07
7.2.50.0070.41816.95
7.2.40.0030.43717.05
7.2.30.0100.43116.82
7.2.20.0030.43316.98
7.2.10.0070.42316.73
7.2.00.0030.44018.02
7.1.330.0070.43615.81
7.1.320.0070.43215.73
7.1.310.0070.42715.78
7.1.300.0070.43215.76
7.1.290.0070.42815.52
7.1.280.0030.42815.55
7.1.270.0000.44615.95
7.1.260.0070.44015.66
7.1.250.0030.44015.92
7.1.240.0030.42516.03
7.1.230.0100.42715.85
7.1.220.0030.43515.80
7.1.210.0130.40715.92
7.1.200.0070.42815.80
7.1.190.0030.44015.69
7.1.180.0100.41515.68
7.1.170.0000.43115.65
7.1.160.0030.43915.90
7.1.150.0070.42515.84
7.1.140.0030.44915.47
7.1.130.0070.42715.76
7.1.120.0100.42016.03
7.1.110.0030.42816.03
7.1.100.0030.44316.02
7.1.90.0000.44215.86
7.1.80.0000.42315.61
7.1.70.0030.42916.39
7.1.60.0080.46917.62
7.1.50.0080.46316.33
7.1.40.0000.43415.68
7.1.30.0030.42415.84
7.1.20.0000.43615.68
7.1.10.0070.41916.02
7.1.00.0030.44919.20
7.0.330.0030.44015.55
7.0.320.0030.43815.61
7.0.310.0070.42315.32
7.0.300.0030.42715.40
7.0.290.0100.41815.36
7.0.280.0030.42515.51
7.0.270.0030.43415.33
7.0.260.0000.43015.48
7.0.250.0070.42515.46
7.0.240.0070.42815.46
7.0.230.0070.43415.63
7.0.220.0030.43215.68
7.0.210.0070.43015.46
7.0.200.0030.43316.17
7.0.190.0070.42415.65
7.0.180.0030.42115.50
7.0.170.0030.42615.25
7.0.160.0070.43015.50
7.0.150.0030.43215.60
7.0.140.0080.46318.71
7.0.130.0030.43015.60
7.0.120.0050.45418.77
7.0.110.0000.42915.31
7.0.100.0070.43915.23
7.0.90.0030.43815.50
7.0.80.0070.43015.42
7.0.70.0030.44015.46
7.0.60.0100.48718.69
7.0.50.0100.47616.76
7.0.40.0170.47016.84
7.0.30.0120.44616.69
7.0.20.0180.44316.86
7.0.10.0130.44616.79
7.0.00.0130.45116.84
5.6.400.0070.43914.53
5.6.390.0030.42514.74
5.6.380.0030.42614.31
5.6.370.0000.42914.26
5.6.360.0100.43414.59
5.6.350.0030.43414.32
5.6.340.0070.41814.44
5.6.330.0030.41914.14
5.6.320.0070.44714.53
5.6.310.0030.44214.50
5.6.300.0000.44414.63
5.6.290.0100.42014.06
5.6.280.0050.47217.58
5.6.270.0070.43414.49
5.6.260.0030.43914.35
5.6.250.0030.44214.60
5.6.240.0030.42614.24
5.6.230.0000.44714.45
5.6.220.0030.41914.39
5.6.210.0070.47617.43
5.6.200.0070.44716.20
5.6.190.0170.48017.50
5.6.180.0200.46617.40
5.6.170.0100.45117.52
5.6.160.0120.44117.43
5.6.150.0100.45417.41
5.6.140.0130.46517.33
5.6.130.0150.45617.38
5.6.120.0180.46417.40
5.6.110.0220.46817.31
5.6.100.0180.46717.35
5.6.90.0200.47517.28
5.6.80.0170.44116.90
5.6.70.0130.44916.97
5.6.60.0170.47116.94
5.6.50.0130.48216.94
5.6.40.0130.47716.88
5.6.30.0210.45116.95
5.6.20.0270.46516.79
5.6.10.0170.44317.06
5.6.00.0150.46716.89
5.5.380.0030.42014.33
5.5.370.0070.42614.33
5.5.360.0030.41714.46
5.5.350.0030.50517.21
5.5.340.0080.48616.22
5.5.330.0470.47817.38
5.5.320.0150.45817.44
5.5.310.0080.44517.19
5.5.300.0150.43517.27
5.5.290.0200.46817.21
5.5.280.0180.46517.17
5.5.270.0150.48617.27
5.5.260.0130.48017.10
5.5.250.0120.46317.15
5.5.240.0170.43616.93
5.5.230.0170.46516.87
5.5.220.0180.46316.77
5.5.210.0220.46916.78
5.5.200.0200.47116.79
5.5.190.0100.45516.83
5.5.180.0620.45516.84
5.5.170.0000.43214.04
5.5.160.0220.46716.83
5.5.150.0180.47616.74
5.5.140.0170.46816.84
5.5.130.0170.47416.86
5.5.120.0180.46816.87
5.5.110.0170.44217.00
5.5.100.0180.46216.84
5.5.90.0150.47316.75
5.5.80.0120.44216.86
5.5.70.0150.45616.65
5.5.60.0700.44116.78
5.5.50.0180.46116.82
5.5.40.0150.46116.65
5.5.30.0220.46616.79
5.5.20.0150.47416.73
5.5.10.0200.47616.81
5.5.00.0180.46016.86
5.4.450.0120.02314.95
5.4.440.0120.03315.13
5.4.430.0180.03715.04
5.4.420.0170.03214.95
5.4.410.0130.03515.06
5.4.400.0130.02314.88
5.4.390.0130.01815.05
5.4.380.0180.03214.93
5.4.370.0230.03114.94
5.4.360.0320.03215.08
5.4.350.0180.01815.09
5.4.340.0150.04114.92
5.4.330.0000.00710.71
5.4.320.0210.03214.81
5.4.310.0170.02315.04
5.4.300.0220.03314.97
5.4.290.0200.03315.11
5.4.280.0150.02014.82
5.4.270.0210.03514.96
5.4.260.0150.03714.94
5.4.250.0100.02415.02
5.4.240.0130.02614.86
5.4.230.0120.02514.86
5.4.220.0270.03315.02
5.4.210.0150.03914.93
5.4.200.0170.03314.88
5.4.190.0120.03414.87
5.4.180.0200.03614.97
5.4.170.0230.03314.94
5.4.160.0180.03514.82
5.4.150.0120.02414.95
5.4.140.0140.02813.57
5.4.130.0120.02713.64
5.4.120.0080.02313.43
5.4.110.0170.02313.51
5.4.100.0330.02513.52
5.4.90.0150.02713.66
5.4.80.0150.03213.52
5.4.70.0130.02013.61
5.4.60.0180.03113.63
5.4.50.0160.03513.57
5.4.40.0210.03513.57
5.4.30.0190.03613.60
5.4.20.0150.02413.57
5.4.10.0210.03313.42
5.4.00.0230.03113.47
5.3.290.0130.02312.44
5.3.280.0120.02512.46
5.3.270.0130.03912.46
5.3.260.0170.04212.50
5.3.250.0160.03812.46
5.3.240.0150.02012.46
5.3.230.0150.02012.48
5.3.220.0120.02812.44
5.3.210.0120.02812.45
5.3.200.0150.02212.49
5.3.190.0160.03812.49
5.3.180.0170.02012.42
5.3.170.0160.03312.49
5.3.160.0160.02812.44
5.3.150.0160.02512.45
5.3.140.0150.03112.44
5.3.130.0180.02512.51
5.3.120.0180.02312.44
5.3.110.0160.04112.47
5.3.100.0250.03012.19
5.3.90.0170.03712.18
5.3.80.0110.02312.13
5.3.70.0160.02012.17
5.3.60.0120.04012.16
5.3.50.0120.02312.13
5.3.40.0130.02512.13
5.3.30.0160.02012.04
5.3.20.0150.03212.02
5.3.10.0100.02111.99
5.3.00.0180.01811.92
5.2.170.0200.02712.62
5.2.160.0200.05012.62
5.2.150.0200.03312.62
5.2.140.0230.04012.62
5.2.130.0170.02712.62
5.2.120.0170.04712.62
5.2.110.0230.02312.62
5.2.100.0230.03712.62
5.2.90.0300.05012.62
5.2.80.0200.05312.62
5.2.70.0200.03312.62
5.2.60.0330.03712.62
5.2.50.0230.03712.62
5.2.40.0200.02712.62
5.2.30.0230.05312.62
5.2.20.0270.04712.62
5.2.10.0430.03712.62
5.2.00.0200.06312.62
5.1.60.0270.04312.62
5.1.50.0130.03012.62
5.1.40.0170.05012.62
5.1.30.0230.02312.62
5.1.20.0170.05312.62
5.1.10.0130.05312.62
5.1.00.0100.03312.62
5.0.50.0130.02712.62
5.0.40.0100.02312.62
5.0.30.0100.06712.62
5.0.20.0130.04012.62
5.0.10.0130.02012.62
5.0.00.0070.03312.62
4.4.90.0170.03312.62
4.4.80.0100.03012.62
4.4.70.0100.02012.62
4.4.60.0130.03312.62
4.4.50.0100.03312.62
4.4.40.0170.04712.62
4.4.30.0070.02712.62
4.4.20.0070.02012.62
4.4.10.0100.03312.62
4.4.00.0070.02712.62
4.3.110.0070.02012.62
4.3.100.0100.02712.62
4.3.90.0200.03012.62
4.3.80.0070.03012.62
4.3.70.0100.02312.62
4.3.60.0200.02012.62
4.3.50.0100.02712.62
4.3.40.0270.03312.62
4.3.30.0070.03712.62
4.3.20.0070.03012.62
4.3.10.0070.03712.62
4.3.00.0230.02012.62

preferences:
28.72 ms | 401 KiB | 5 Q