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. 8-10 is a good baseline, and more is good if your servers * are fast enough. The code below aims for ≤ 50 milliseconds stretching time, * which is a good baseline for systems handling interactive logins. */ $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.00.0070.10715.05
7.3.120.0100.10514.57
7.3.110.0070.10814.84
7.3.100.0070.10114.72
7.3.90.0160.09214.90
7.3.80.0070.09714.84
7.3.70.0070.10014.88
7.3.60.0030.10114.83
7.3.50.0030.10814.92
7.3.40.0030.10514.75
7.3.30.0100.09114.50
7.3.20.0000.10416.75
7.3.10.0080.09916.79
7.3.00.0070.10616.53
7.2.250.0100.10414.89
7.2.240.0000.10414.95
7.2.230.0000.10615.14
7.2.220.0030.10515.22
7.2.210.0030.10715.29
7.2.200.0030.09615.05
7.2.190.0100.09814.93
7.2.180.0070.10515.11
7.2.170.0030.10415.09
7.2.160.0000.10715.11
7.2.150.0070.09517.10
7.2.140.0030.10116.95
7.2.130.0050.09916.83
7.2.120.0030.10216.86
7.2.110.0050.10216.96
7.2.100.0080.09716.87
7.2.90.0020.10316.96
7.2.80.0070.09917.05
7.2.70.0050.10417.03
7.2.60.0120.09317.03
7.2.50.0070.10516.85
7.2.40.0100.10116.97
7.2.30.0070.09916.95
7.2.20.0050.10217.06
7.2.10.0080.10117.04
7.2.00.0050.10417.76
7.1.330.0030.11015.90
7.1.320.0070.10515.90
7.1.310.0030.10015.98
7.1.300.0030.10315.66
7.1.290.0030.10515.59
7.1.280.0030.10315.94
7.1.270.0030.09715.52
7.1.260.0070.09515.57
7.1.250.0020.10315.80
7.1.240.0070.09415.73
7.1.230.0030.09815.97
7.1.220.0030.10215.93
7.1.210.0030.10315.94
7.1.200.0030.10515.61
7.1.190.0030.10015.77
7.1.180.0000.10215.98
7.1.170.0030.10415.66
7.1.160.0070.09715.93
7.1.150.0030.10215.76
7.1.140.0030.09815.63
7.1.130.0000.11115.83
7.1.120.0000.11215.87
7.1.110.0100.09715.66
7.1.100.0070.10216.05
7.1.90.0070.10615.90
7.1.80.0030.09915.64
7.1.70.0070.09716.55
7.1.60.0000.09817.58
7.1.50.0030.08916.29
7.1.40.0030.09715.75
7.1.30.0070.10215.63
7.1.20.0030.10215.84
7.1.10.0100.09615.89
7.1.00.0000.15519.03
7.0.330.0000.10515.18
7.0.320.0030.10215.45
7.0.310.0030.10115.27
7.0.300.0000.09815.57
7.0.290.0030.10615.16
7.0.280.0130.09415.15
7.0.270.0100.10015.50
7.0.260.0070.09615.34
7.0.250.0030.10915.15
7.0.240.0070.09615.23
7.0.230.0100.09715.68
7.0.220.0030.10515.38
7.0.210.0000.10215.61
7.0.200.0020.10315.98
7.0.190.0030.10315.25
7.0.180.0030.10015.19
7.0.170.0070.09615.33
7.0.160.0060.09815.43
7.0.150.0070.09615.57
7.0.140.0050.14718.65
7.0.130.0000.10615.56
7.0.120.0030.09415.46
7.0.110.0030.09715.49
7.0.100.0070.11917.70
7.0.90.0020.13217.69
7.0.80.0100.13717.58
7.0.70.0080.13017.77
7.0.60.0050.13317.64
7.0.50.0130.12617.85
7.0.40.0050.14716.72
7.0.30.0070.11916.89
7.0.20.0050.15316.83
7.0.10.0080.12216.82
7.0.00.0020.12016.84
5.6.400.0030.10714.70
5.6.390.0070.10214.21
5.6.380.0030.09914.33
5.6.370.0030.10014.24
5.6.360.0130.10514.48
5.6.350.0030.10314.70
5.6.340.0070.09714.54
5.6.330.0070.09814.13
5.6.320.0070.09814.11
5.6.310.0030.10714.47
5.6.300.0070.09814.27
5.6.290.0070.09714.09
5.6.280.0050.14817.67
5.6.270.0000.10014.38
5.6.260.0030.10614.48
5.6.250.0030.13117.49
5.6.240.0050.13017.50
5.6.230.0050.13317.55
5.6.220.0030.13017.49
5.6.210.0050.14017.40
5.6.200.0030.16117.68
5.6.190.0050.14117.79
5.6.180.0080.12817.70
5.6.170.0080.13417.71
5.6.160.0100.11217.54
5.6.150.0170.11317.58
5.6.140.0050.14417.71
5.6.130.0050.14717.64
5.6.120.0030.14417.72
5.6.110.0070.10817.60
5.6.100.0100.14617.67
5.6.90.0020.11217.81
5.6.80.0050.10817.42
5.6.70.0030.11917.21
5.6.60.0070.10417.40
5.6.50.0080.14617.35
5.6.40.0030.14817.30
5.6.30.0030.14917.39
5.6.20.0000.13717.39
5.6.10.0030.12917.26
5.6.00.0050.14117.25
5.5.380.0070.17320.35
5.5.370.0130.17020.39
5.5.360.0100.17720.48
5.5.350.0170.19720.45
5.5.340.0070.15320.84
5.5.330.0030.12720.91
5.5.320.0070.20020.73
5.5.310.0100.17720.79
5.5.300.0030.14720.80
5.5.290.0030.19320.91
5.5.280.0070.16020.91
5.5.270.0030.19720.79
5.5.260.0130.11320.79
5.5.250.0100.16320.63
5.5.240.0100.19720.02
5.5.230.0100.18320.21
5.5.220.0130.19720.20
5.5.210.0030.20020.23
5.5.200.0070.15020.25
5.5.190.0070.11320.14
5.5.180.0170.18320.26
5.5.160.0070.18320.06
5.5.150.0070.14720.11
5.5.140.0000.12020.26
5.5.130.0130.16020.14
5.5.120.0100.12320.22
5.5.110.0130.15319.98
5.5.100.0130.16720.11
5.5.90.0070.21020.16
5.5.80.0370.10320.09
5.5.70.0070.20320.14
5.5.60.0070.16720.08
5.5.50.0100.15720.05
5.5.40.0000.21720.09
5.5.30.0070.13720.14
5.5.20.0070.16720.12
5.5.10.0130.15720.13
5.5.00.0100.13020.06
5.4.450.0070.03719.29
5.4.440.0070.04019.45
5.4.430.0070.06019.22
5.4.420.0000.08719.28
5.4.410.0100.07319.17
5.4.400.0100.07019.14
5.4.390.0070.08018.81
5.4.380.0030.08019.05
5.4.370.0130.06719.05
5.4.360.0070.08019.03
5.4.350.0100.07318.96
5.4.340.0070.08019.13
5.4.320.0030.07719.14
5.4.310.0100.03018.98
5.4.300.0030.08019.12
5.4.290.0030.06718.81
5.4.280.0030.04019.09
5.4.270.0170.06319.22
5.4.260.0130.02718.98
5.4.250.0030.07318.97
5.4.240.0070.04018.82
5.4.230.0100.06318.89
5.4.220.0200.02319.11
5.4.210.0030.03319.02
5.4.200.0030.05018.80
5.4.190.0030.06719.09
5.4.180.0130.06719.09
5.4.170.0100.06019.13
5.4.160.0130.05719.05
5.4.150.0000.04018.99
5.4.140.0030.07316.37
5.4.130.0030.07716.33
5.4.120.0000.03716.32
5.4.110.0100.06316.42
5.4.100.0070.07316.23
5.4.90.0070.05716.45
5.4.80.0070.06316.20
5.4.70.0070.06716.24
5.4.60.0100.06016.41
5.4.50.0030.04316.35
5.4.40.0070.06016.41
5.4.30.0070.02716.23
5.4.20.0030.03016.41
5.4.10.0070.08016.20
5.4.00.0070.06715.71
5.3.290.0100.05315.55
5.3.280.0070.05715.55
5.3.270.0100.07715.55
5.3.260.0100.05715.55
5.3.250.0030.03715.55
5.3.240.0000.07315.55
5.3.230.0070.05715.55
5.3.220.0100.03015.55
5.3.210.0130.07015.55
5.3.200.0070.04015.55
5.3.190.0130.08715.55
5.3.180.0030.08315.55
5.3.170.0070.07015.55
5.3.160.0000.08015.55
5.3.150.0070.07315.55
5.3.140.0070.05315.55
5.3.130.0070.08015.55
5.3.120.0030.03315.55
5.3.110.0070.04015.55
5.3.100.0070.07015.55
5.3.90.0070.04015.55
5.3.80.0070.07315.55
5.3.70.0100.03015.55
5.3.60.0030.03315.55
5.3.50.0130.05715.55
5.3.40.0100.03015.55
5.3.30.0000.07015.55
5.3.20.0000.07015.55
5.3.10.0100.03015.55
5.3.00.0070.04315.55
5.2.170.0000.03715.55
5.2.160.0070.04315.55
5.2.150.0070.02715.55
5.2.140.0130.05015.55
5.2.130.0070.05715.55
5.2.120.0070.03015.55
5.2.110.0070.06015.55
5.2.100.0000.02715.55
5.2.90.0070.05315.55
5.2.80.0030.03715.55
5.2.70.0070.03715.55
5.2.60.0100.05715.55
5.2.50.0030.04315.55
5.2.40.0030.05315.55
5.2.30.0030.03315.55
5.2.20.0100.05715.55
5.2.10.0070.05015.55
5.2.00.0030.05015.55
5.1.60.0030.04015.55
5.1.50.0000.05715.55
5.1.40.0070.03715.55
5.1.30.0070.05315.55
5.1.20.0070.05315.55
5.1.10.0030.05015.55
5.1.00.0100.04715.55
5.0.50.0100.04015.55
5.0.40.0000.04315.55
5.0.30.0030.04715.55
5.0.20.0070.02015.55
5.0.10.0000.04715.55
5.0.00.0070.06315.55
4.4.90.0070.03315.55
4.4.80.0000.03315.55
4.4.70.0030.03715.55
4.4.60.0030.03015.55
4.4.50.0070.03315.55
4.4.40.0000.03015.55
4.4.30.0030.02315.55
4.4.20.0000.03715.55
4.4.10.0070.03315.55
4.4.00.0000.05715.55
4.3.110.0000.03715.55
4.3.100.0000.02015.55
4.3.90.0030.03315.55
4.3.80.0000.06015.55
4.3.70.0000.03015.55
4.3.60.0030.02015.55
4.3.50.0070.02015.55
4.3.40.0000.03715.55
4.3.30.0000.03015.55
4.3.20.0070.03015.55
4.3.10.0000.03015.55
4.3.00.0000.03015.55

preferences:
33.21 ms | 401 KiB | 5 Q