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.3.120.0130.43014.88
7.3.110.0100.45014.57
7.3.100.0070.42014.63
7.3.90.0100.42414.77
7.3.80.0100.45014.76
7.3.70.0030.42314.69
7.3.60.0030.42714.91
7.3.50.0030.43914.62
7.3.40.0030.42714.73
7.3.30.0070.43114.77
7.3.20.0030.43016.62
7.3.10.0050.42716.45
7.3.00.0070.43016.67
7.2.240.0100.45115.17
7.2.230.0030.43414.99
7.2.220.0130.43015.02
7.2.210.0030.44214.96
7.2.200.0030.43915.19
7.2.190.0100.43314.88
7.2.180.0000.44515.17
7.2.170.0030.44315.00
7.2.160.0000.43214.99
7.2.150.0030.44316.94
7.2.140.0030.43317.10
7.2.130.0070.43216.82
7.2.120.0070.43316.86
7.2.110.0080.41916.81
7.2.100.0050.43716.97
7.2.90.0050.44316.76
7.2.80.0130.42616.88
7.2.70.0070.43916.77
7.2.60.0120.43116.92
7.2.50.0100.43917.01
7.2.40.0020.44016.82
7.2.30.0070.43517.02
7.2.20.0070.43816.92
7.2.10.0030.41916.85
7.2.00.0110.43217.78
7.1.330.0100.45716.06
7.1.320.0020.44116.11
7.1.310.0030.42915.71
7.1.300.0000.44715.89
7.1.290.0070.42515.71
7.1.280.0030.43115.73
7.1.270.0030.44015.89
7.1.260.0100.42715.95
7.1.250.0030.42815.75
7.1.70.0070.48417.26
7.1.60.0170.48119.46
7.1.50.0100.43716.66
7.1.00.0030.51722.35
7.0.200.0000.43216.85
7.0.140.0000.50322.09
7.0.60.0100.51319.82
7.0.50.0070.51717.83
7.0.40.0030.46020.13
7.0.30.0200.45320.24
7.0.20.0130.45720.21
7.0.10.0170.50020.12
7.0.00.0030.51720.16
5.6.280.0001.79020.82
5.6.210.0070.47720.54
5.6.200.0100.53318.11
5.6.190.0030.51020.67
5.6.180.0500.50320.51
5.6.170.0270.49320.51
5.6.160.0000.54320.55
5.6.150.0130.52318.07
5.6.140.0000.45718.18
5.6.130.0100.51018.18
5.6.120.0030.49320.89
5.6.110.0100.54020.96
5.6.100.0130.46321.07
5.6.90.0070.53320.86
5.6.80.0070.53020.36
5.5.350.3170.38720.38
5.5.340.0100.46318.02
5.5.330.0070.47720.40
5.5.320.0270.47720.21
5.5.310.0270.53020.26
5.5.300.0170.52718.01
5.5.290.0030.52317.95
5.5.280.0130.52320.68
5.5.270.0070.48020.77
5.5.260.0070.45020.64
5.5.250.0000.54720.66
5.5.240.0030.51720.25
5.4.450.0930.03319.21
5.4.440.1100.05019.45
5.4.430.0030.04019.57
5.4.420.0570.03719.49
5.4.410.0000.03719.36
5.4.400.0670.03319.14
5.4.390.0600.04318.81
5.4.380.0330.05718.65
5.4.370.0330.05318.71
5.4.360.0330.05718.73
5.4.350.0300.06018.61
5.4.340.0270.05718.72
5.4.320.0050.03612.46
5.4.310.0030.04112.45
5.4.300.0110.04212.45
5.4.290.0080.05512.43
5.4.280.0170.10812.34
5.4.270.0030.07212.33
5.4.260.0090.08412.34
5.4.250.0090.05212.34
5.4.240.0060.05612.34
5.4.230.0110.06312.32
5.4.220.0060.06212.32
5.4.210.0150.05712.32
5.4.200.0080.04012.33
5.4.190.0080.04412.32
5.4.180.0060.04912.32
5.4.170.0070.04712.33
5.4.160.0080.05012.33
5.4.150.0110.05112.33
5.4.140.0100.05212.01
5.4.130.0060.05212.00
5.4.120.0110.05211.96
5.4.110.0120.06011.95
5.4.100.0110.07211.95
5.4.90.0180.06411.95
5.4.80.0110.08611.95
5.4.70.0100.07111.94
5.4.60.0070.06111.94
5.4.50.0100.08111.95
5.4.40.0140.07511.93
5.4.30.0080.05111.93
5.4.20.0120.05711.93
5.4.10.0090.04911.93
5.4.00.0090.04811.43
5.3.290.0060.04612.80
5.3.280.0180.05012.71
5.3.270.0090.06712.72
5.3.260.0100.06012.72
5.3.250.0110.06312.72
5.3.240.0100.07412.72
5.3.230.0110.07512.70
5.3.220.0130.05712.68
5.3.210.0160.05912.68
5.3.200.0190.05412.68
5.3.190.0120.06112.67
5.3.180.0130.06012.68
5.3.170.0120.04712.67
5.3.160.0090.07812.67
5.3.150.0070.04212.67
5.3.140.0070.04112.66
5.3.130.0060.04112.66
5.3.120.0110.04112.65
5.3.110.0120.04612.65
5.3.100.0060.04512.12
5.3.90.0080.03812.09
5.3.80.0070.03712.07
5.3.70.0060.03712.08
5.3.60.0060.03712.06
5.3.50.0070.04212.00
5.3.40.0100.04212.00
5.3.30.0140.03111.95
5.3.20.0070.04511.72
5.3.10.0080.05111.70
5.3.00.0090.05011.68
5.2.170.0040.0429.18
5.2.160.0070.0389.19
5.2.150.0080.0399.19
5.2.140.0090.0709.18
5.2.130.0160.0669.14
5.2.120.0170.0839.14
5.2.110.0050.0319.15
5.2.100.0050.0299.14
5.2.90.0050.0319.14
5.2.80.0080.0309.14
5.2.70.0070.0289.14
5.2.60.0060.0309.09
5.2.50.0070.0299.07
5.2.40.0090.0299.04
5.2.30.0130.0549.02
5.2.20.0090.0289.00
5.2.10.0030.0388.93
5.2.00.0050.0458.79
5.1.60.0070.0388.07
5.1.50.0080.0328.07
5.1.40.0040.0278.05
5.1.30.0040.0418.40
5.1.20.0090.0258.42
5.1.10.0040.0318.14
5.1.00.0050.0388.15
5.0.50.0100.0366.62
5.0.40.0050.0276.48
5.0.30.0060.0436.29
5.0.20.0040.0306.29
5.0.10.0030.0306.27
5.0.00.0110.0566.26
4.4.90.0120.0394.78
4.4.80.0020.0184.76
4.4.70.0070.0434.76
4.4.60.0050.0244.75
4.4.50.0120.0384.77
4.4.40.0050.0434.71
4.4.30.0340.0494.76
4.4.20.0180.0394.85
4.4.10.0170.0324.85
4.4.00.0140.0664.76
4.3.110.0120.0234.67
4.3.100.0090.0314.66
4.3.90.0100.0334.64
4.3.80.0050.0274.59
4.3.70.0060.0154.63
4.3.60.0130.0154.63
4.3.50.0050.0174.63
4.3.40.0160.0484.54
4.3.30.0060.0193.31
4.3.20.0010.0193.29
4.3.10.0030.0163.25
4.3.00.0130.01016.04

preferences:
34.28 ms | 401 KiB | 5 Q