3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cost = 9; do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); } while ($end - $start < 0.1); var_dump($cost);

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.0100.20014.81
7.3.120.0090.19514.59
7.3.110.0070.20414.53
7.3.100.0030.19715.05
7.3.90.0070.20314.82
7.3.80.0070.18615.03
7.3.70.0000.19114.52
7.3.60.0070.19614.83
7.3.50.0030.18714.66
7.3.40.0070.19014.98
7.3.30.0000.19614.84
7.3.20.0130.18116.45
7.3.10.0030.18816.34
7.3.00.0070.18216.85
7.2.250.0070.19815.17
7.2.240.0070.20614.98
7.2.230.0070.19615.10
7.2.220.0000.20115.29
7.2.210.0100.18114.86
7.2.200.0030.19815.23
7.2.190.0030.19615.11
7.2.180.0030.18914.78
7.2.170.0000.19115.04
7.2.00.0030.19419.47
7.1.330.0030.19315.63
7.1.320.0070.17915.63
7.1.310.0070.19015.98
7.1.300.0070.18415.94
7.1.290.0000.19015.85
7.1.280.0030.18215.73
7.1.270.0030.19215.65
7.1.260.0000.19315.76
7.1.70.0030.18617.18
7.1.60.0130.12319.32
7.1.50.0030.12616.85
7.1.00.0030.29722.35
7.0.200.0000.19016.65
7.0.140.0070.27722.23
7.0.120.0030.52021.97
7.0.110.0000.22722.11
7.0.100.0100.49722.01
7.0.90.0030.25022.07
7.0.80.0100.53321.99
7.0.70.0000.26021.99
7.0.60.0000.28021.93
7.0.50.0030.52722.08
7.0.40.0000.25019.99
7.0.30.0030.23720.04
7.0.20.0030.19720.10
7.0.10.0100.29020.12
7.0.00.0070.19319.98
5.6.280.0070.29320.91
5.6.270.0100.27321.05
5.6.260.0070.19021.06
5.6.250.0030.26721.05
5.6.240.0030.29021.02
5.6.230.0000.30321.02
5.6.220.0100.28321.02
5.6.210.0070.49020.94
5.6.200.0100.18020.96
5.6.190.0100.33321.04
5.6.180.0100.27021.04
5.6.170.0070.26721.00
5.6.160.0200.14020.87
5.6.150.0130.23020.78
5.6.140.0030.27721.01
5.6.130.0070.26720.98
5.6.120.0100.27720.87
5.6.110.0070.22020.88
5.6.100.0070.23020.96
5.6.90.0070.22720.93
5.6.80.0100.26320.26
5.6.70.0000.22320.22
5.6.60.0030.22020.24
5.6.50.0030.22020.33
5.6.40.0070.14720.32
5.6.30.0070.23320.39
5.6.20.0000.27720.30
5.6.10.0070.26320.38
5.6.00.0030.30320.14
5.5.380.0100.26717.63
5.5.370.0070.19017.59
5.5.360.0070.26717.55
5.5.350.0030.26017.57
5.5.340.0070.27017.91
5.5.330.0000.29318.22
5.5.320.0070.27717.98
5.5.310.0100.27018.04
5.5.300.0100.19018.09
5.5.290.0130.27318.10
5.5.280.0030.22317.84
5.5.270.0200.18718.24
5.5.260.0070.19318.02
5.5.250.0000.20017.80
5.5.240.0030.22317.64
5.5.230.0130.24317.52
5.5.220.0070.38017.29
5.5.210.0070.23317.60
5.5.200.0070.19017.20
5.5.190.0000.21717.47
5.5.180.0030.22317.33
5.5.160.0070.24017.60
5.5.150.0030.27717.34
5.5.140.0030.23317.27
5.5.130.0030.48017.27
5.5.120.0070.21017.44
5.5.110.0030.23717.46
5.5.100.0100.29017.48
5.5.90.0100.51317.09
5.5.80.0000.29717.35
5.5.70.0000.29717.34
5.5.60.0030.29717.46
5.5.50.0100.27317.36
5.5.40.0070.19017.08
5.5.30.0000.26717.37
5.5.20.0030.29017.27
5.5.10.0070.27017.00
5.5.00.0070.19017.16
5.4.450.0070.04719.17
5.4.440.0070.07319.27
5.4.430.0100.03319.31
5.4.420.0100.03319.26
5.4.410.0030.03719.23
5.4.400.0070.03019.08
5.4.390.0000.04019.20
5.4.380.0030.06018.92
5.4.370.0070.03319.08
5.4.360.0030.04318.90
5.4.350.0030.03718.93
5.4.340.0030.05318.86
5.4.320.0070.07719.06
5.4.310.0070.07718.93
5.4.300.0000.07719.07
5.4.290.0000.06319.20
5.4.280.0030.03719.02
5.4.270.0070.07318.90
5.4.260.0030.07318.90
5.4.250.0100.07019.07
5.4.240.0000.08718.93
5.4.230.0070.07019.04
5.4.220.0070.07018.89
5.4.210.0000.06718.85
5.4.200.0070.08018.82
5.4.190.0000.03718.96
5.4.180.0030.07718.88
5.4.170.0100.07018.89
5.4.160.0030.04318.87
5.4.150.0000.05319.18
5.4.140.0000.03716.48
5.4.130.0000.07016.16
5.4.120.0030.03316.10
5.4.110.0030.03316.08
5.4.100.0130.07716.45
5.4.90.0070.05716.41
5.4.80.0030.03316.31
5.4.70.0030.03316.05
5.4.60.0030.03716.29
5.4.50.0000.06316.26
5.4.40.0100.06316.11
5.4.30.0000.04316.15
5.4.20.0030.07016.16
5.4.10.0070.07716.40
5.4.00.0030.06715.59
5.3.290.0030.07714.66
5.3.280.0030.08314.54
5.3.270.0030.04714.50
5.3.260.0000.05314.47
5.3.250.0100.03014.51
5.3.240.0030.03314.70
5.3.230.0070.07314.56
5.3.220.0070.03014.47
5.3.210.0100.05714.50
5.3.200.0000.07314.51
5.3.190.0000.07014.36
5.3.180.0000.03714.47
5.3.170.0000.06314.46
5.3.160.0030.04714.56
5.3.150.0070.06014.51
5.3.140.0030.07014.57
5.3.130.0030.04014.41
5.3.120.0030.07714.56
5.3.110.0030.03714.56
5.3.100.0030.06714.13
5.3.90.0000.04713.91
5.3.80.0000.07313.96
5.3.70.0030.03313.96
5.3.60.0000.07713.91
5.3.50.0000.03713.95
5.3.40.0100.03713.73
5.3.30.0070.03313.75
5.3.20.0070.06013.59
5.3.10.0030.05713.52
5.3.00.0030.07713.52
5.2.170.0070.03310.93
5.2.160.0000.03711.09
5.2.150.0030.02711.05
5.2.140.0030.07011.04
5.2.130.0030.06310.99
5.2.120.0030.05311.00
5.2.110.0000.04311.17
5.2.100.0000.02711.00
5.2.90.0030.05711.26
5.2.80.0000.03711.16
5.2.70.0000.06311.03
5.2.60.0100.05710.98
5.2.50.0030.06010.95
5.2.40.0000.03010.90
5.2.30.0030.05710.86
5.2.20.0030.03711.03
5.2.10.0000.04710.86
5.2.00.0030.05310.70
5.1.60.0030.0309.98
5.1.50.0030.0209.96
5.1.40.0030.0279.91
5.1.30.0000.05010.42
5.1.20.0030.02710.43
5.1.10.0000.02310.08
5.1.00.0000.05310.00
5.0.50.0000.0479.71
5.0.40.0030.0379.71
5.0.30.0000.0579.71
5.0.20.0030.0279.71
5.0.10.0000.0379.71
5.0.00.0000.0279.71
4.4.90.0070.0309.71
4.4.80.0000.0239.71
4.4.70.0000.0209.71
4.4.60.0030.0279.71
4.4.50.0000.0279.71
4.4.40.0030.0209.71
4.4.30.0000.0139.71
4.4.20.0000.0179.71
4.4.10.0030.0209.71
4.4.00.0030.0379.71
4.3.110.0030.0109.71
4.3.100.0000.0339.71
4.3.90.0000.0339.71
4.3.80.0030.0509.71
4.3.70.0000.0239.71
4.3.60.0000.0139.71
4.3.50.0000.0309.71
4.3.40.0030.0479.71
4.3.30.0030.0279.71
4.3.20.0000.0179.71
4.3.10.0030.0139.71
4.3.00.0000.0239.71

preferences:
36.3 ms | 401 KiB | 5 Q