3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ''; $hashes = array(); $options = array( 'cost' => 4, 'salt' => '1234567890123456789012', ); do { $str .= '0'; $hashes[] = password_hash($str, PASSWORD_BCRYPT, $options); if (count(array_unique($hashes)) === count($hashes)) $allUnique = true; else $allUnique = false; } while($allUnique); echo "Stopped at " . strlen($str) . " characters before truncation was detected...\n\n"; $lst = array_pop($hashes); $stl = array_pop($hashes); echo "$stl\n$lst";

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.09415.07
7.4.00.0050.09515.08
7.3.130.0080.09414.95
7.3.120.0090.09414.86
7.3.110.0080.09514.93
7.3.100.0040.09114.95
7.3.90.0080.08714.90
7.3.80.0080.08714.81
7.3.70.0070.08914.81
7.3.60.0020.09014.81
7.3.50.0030.09314.82
7.3.40.0060.08814.78
7.3.30.0070.08614.88
7.3.20.0030.09316.70
7.3.10.0060.08716.65
7.3.00.0060.08716.72
7.2.260.0070.09615.15
7.2.250.0090.09315.22
7.2.240.0050.09515.07
7.2.230.0060.09315.09
7.2.220.0070.09115.19
7.2.210.0050.08915.03
7.2.200.0050.08915.12
7.2.190.0050.09215.04
7.2.180.0040.09015.02
7.2.170.0020.08915.10
7.2.160.0100.08415.10
7.2.150.0070.08616.90
7.2.140.0030.09116.96
7.2.130.0040.09117.04
7.2.120.0050.08916.84
7.2.110.0040.08816.95
7.2.100.0030.09216.98
7.2.90.0050.08916.87
7.2.80.0030.09116.88
7.2.70.0060.08517.05
7.2.60.0050.08617.01
7.2.50.0040.08716.88
7.2.40.0070.08616.93
7.2.30.0020.09116.89
7.2.20.0030.09117.00
7.2.10.0010.09516.95
7.2.00.0070.09117.46
7.1.330.0020.09015.82
7.1.320.0080.08915.73
7.1.310.0030.09215.95
7.1.300.0070.08915.87
7.1.290.0040.08915.65
7.1.280.0050.08915.71
7.1.270.0080.08815.74
7.1.260.0060.08615.68
7.1.250.0040.09115.95
7.1.240.0030.09315.85
7.1.230.0020.09115.88
7.1.220.0020.09015.87
7.1.210.0050.08615.71
7.1.200.0030.09115.87
7.1.190.0050.09015.83
7.1.180.0050.08815.72
7.1.170.0020.09015.97
7.1.160.0000.09115.87
7.1.150.0110.08315.65
7.1.140.0050.08515.62
7.1.130.0050.09015.69
7.1.120.0050.08915.70
7.1.110.0070.08815.86
7.1.100.0030.08916.61
7.1.90.0080.08515.74
7.1.80.0000.09015.74
7.1.70.0070.08416.20
7.1.60.0040.10016.92
7.1.50.0080.08816.27
7.1.40.0050.08515.70
7.1.30.0050.08315.65
7.1.20.0070.08715.85
7.1.10.0070.08415.77
7.1.00.0030.09017.99
7.0.330.0030.08915.28
7.0.320.0030.08815.44
7.0.310.0050.08815.36
7.0.300.0020.08815.45
7.0.290.0020.08915.36
7.0.280.0020.09215.33
7.0.270.0030.09115.39
7.0.260.0030.09115.50
7.0.250.0050.08815.46
7.0.240.0050.08715.48
7.0.230.0030.09115.33
7.0.220.0050.08615.50
7.0.210.0030.08715.51
7.0.200.0070.08515.80
7.0.190.0030.08915.46
7.0.180.0030.08915.35
7.0.170.0080.08315.37
7.0.160.0050.08415.36
7.0.150.0050.08515.44
7.0.140.0060.11217.72
7.0.130.0050.09015.52
7.0.120.0030.09015.45
7.0.110.0100.08315.49
7.0.100.0030.08715.47
7.0.90.0030.08815.39
7.0.80.0070.08515.48
7.0.70.0030.08815.39
7.0.60.0020.12416.93
7.0.50.0050.10216.44
7.0.40.0100.11715.70
7.0.30.0180.10615.70
7.0.20.0140.09915.70
7.0.10.0140.11815.61
7.0.00.0090.11515.72
5.6.400.0080.08614.61
5.6.390.0050.08814.37
5.6.380.0050.09114.34
5.6.370.0020.09114.09
5.6.360.0070.08614.62
5.6.350.0050.08614.60
5.6.340.0000.09214.43
5.6.330.0080.08514.43
5.6.320.0020.09014.18
5.6.310.0070.08914.73
5.6.300.0030.08714.58
5.6.290.0080.08514.48
5.6.280.0090.11916.76
5.6.270.0000.09214.25
5.6.260.0020.08714.68
5.6.250.0050.08814.48
5.6.240.0070.08514.42
5.6.230.0050.08814.49
5.6.220.0020.09314.37
5.6.210.0040.12116.51
5.6.200.0040.12315.71
5.6.190.0070.09616.29
5.6.180.1200.10216.43
5.6.170.0100.11916.52
5.6.160.0070.10616.46
5.6.150.0040.09615.73
5.6.140.0040.12215.69
5.6.130.0070.10315.68
5.6.120.0070.10216.56
5.6.110.0060.09916.66
5.6.100.0060.11316.50
5.6.90.0110.11116.48
5.6.80.0040.09516.47
5.6.70.0110.11616.48
5.6.60.0030.08614.37
5.6.50.0030.08914.27
5.6.40.0020.09014.31
5.6.30.0030.08614.21
5.6.20.0030.08514.40
5.6.10.0030.09314.33
5.6.00.0050.08614.44
5.5.380.0100.08714.66
5.5.370.0030.09514.52
5.5.360.0070.09114.33
5.5.350.0120.11616.28
5.5.340.0070.11115.44
5.5.330.0070.10016.27
5.5.320.0160.10016.27
5.5.310.0120.11416.42
5.5.300.0020.10115.46
5.5.290.0060.12015.61
5.5.280.0010.10716.56
5.5.270.0070.12016.55
5.5.260.0080.11816.52
5.5.250.0030.10516.37
5.5.240.0100.11716.30
5.5.230.0050.09114.35
5.5.220.0050.09214.22
5.5.210.0060.08914.43
5.5.200.0050.09214.42
5.5.190.0050.09114.39
5.5.180.0030.08814.44
5.5.170.0080.08514.23
5.5.160.0050.09514.32
5.5.150.0030.08714.21
5.5.140.0050.09114.45
5.5.130.0050.08614.28
5.5.120.0050.08814.02
5.5.110.0070.08514.00
5.5.100.0070.08614.26
5.5.90.0050.08914.32
5.5.80.0020.08714.17
5.5.70.0020.09114.51
5.5.60.0050.09314.28
5.5.50.0070.08714.22
5.5.40.0070.09114.16
5.5.30.0030.08814.33
5.5.20.0070.08414.31
5.5.10.0050.08814.41
5.5.00.0030.08614.23
5.4.450.0620.01614.09
5.4.440.0520.01714.05
5.4.430.0630.01614.05
5.4.420.0530.01614.08
5.4.410.0620.01413.99
5.4.400.0610.01813.93
5.4.390.0620.01813.97
5.4.380.0650.01313.83
5.4.370.0630.01713.82
5.4.360.0660.01513.98
5.4.350.0510.01813.93
5.4.340.0610.01613.98
5.4.330.0020.00811.35
5.4.320.0490.02013.87
5.4.310.0550.01413.94
5.4.300.0590.01713.92
5.4.290.0620.01813.92
5.4.280.0610.01813.92
5.4.270.0610.01613.92
5.4.260.0630.01513.92
5.4.250.0510.01813.82
5.4.240.0530.01413.92
5.4.230.0640.01813.95
5.4.220.0640.01913.86
5.4.210.0590.01713.94
5.4.200.0590.02013.94
5.4.190.0620.01613.92
5.4.180.0540.01513.82
5.4.170.0620.02013.95
5.4.160.0660.01513.92
5.4.150.0590.01813.85
5.4.140.0570.01712.99
5.4.130.0520.01813.00
5.4.120.0510.02012.99
5.4.110.0610.01913.03
5.4.100.0610.01513.03
5.4.90.0510.01913.04
5.4.80.0580.01312.95
5.4.70.0630.01912.99
5.4.60.0650.01813.05
5.4.50.0540.01612.95
5.4.40.0570.01212.99
5.4.30.0620.01613.05
5.4.20.0570.01613.05
5.4.10.0600.01113.02
5.4.00.0570.01712.81
5.3.290.0650.02012.43
5.3.280.0610.02212.44
5.3.270.0590.02012.41
5.3.260.0590.01912.42
5.3.250.0640.01912.43
5.3.240.0630.01612.38
5.3.230.0650.01512.41
5.3.220.0630.01612.36
5.3.210.0620.01912.37
5.3.200.0590.02112.43
5.3.190.0550.01412.41
5.3.180.0590.01912.40
5.3.170.0490.02012.36
5.3.160.0600.01712.38
5.3.150.0610.01912.45
5.3.140.0620.02112.42
5.3.130.0610.02012.36
5.3.120.0630.01712.44
5.3.110.0590.02312.37
5.3.100.0570.02212.22
5.3.90.0590.01912.24
5.3.80.0610.02012.24
5.3.70.0540.02012.17
5.3.60.0550.01712.19
5.3.50.0590.02212.20
5.3.40.0600.01912.19
5.3.30.0580.01912.18
5.3.20.0620.01812.09
5.3.10.0580.01912.09
5.3.00.0590.02012.06
5.2.170.1500.03311.22
5.2.160.1530.02711.16
5.2.150.1300.02711.01
5.2.140.1470.03311.00
5.2.130.1530.03010.96
5.2.120.1500.02710.95
5.2.110.1530.03010.96
5.2.100.1230.03311.03
5.2.90.1270.02711.04
5.2.80.1500.03710.94
5.2.70.1470.03310.95
5.2.60.1530.03310.91
5.2.50.1530.03311.09
5.2.40.1200.03710.84
5.2.30.1130.03711.13
5.2.20.1300.03710.86
5.2.10.1300.03310.93
5.2.00.0970.03010.63
5.1.60.1300.02710.07
5.1.50.1230.0339.89
5.1.40.1230.0279.86
5.1.30.1300.02710.50
5.1.20.1170.03310.21
5.1.10.1200.0309.96
5.1.00.1400.03010.19
5.0.50.0500.0208.44
5.0.40.0670.0178.34
5.0.30.0530.0338.20
5.0.20.0670.0338.33
5.0.10.0600.0278.16
5.0.00.0630.0408.07
4.4.90.0530.0177.89
4.4.80.0530.0137.89
4.4.70.0500.0177.89
4.4.60.0500.0177.89
4.4.50.0630.0207.89
4.4.40.0630.0277.89
4.4.30.0530.0207.89
4.4.20.0700.0237.89
4.4.10.0030.0177.89
4.4.00.0070.0237.89
4.3.110.0000.0177.89
4.3.100.0000.0177.89
4.3.90.0030.0137.89
4.3.80.0000.0277.89
4.3.70.0000.0307.89
4.3.60.0000.0137.89
4.3.50.0100.0107.89
4.3.40.0070.0377.89
4.3.30.0000.0207.89
4.3.20.0270.0137.89
4.3.10.0370.0177.89
4.3.00.0270.0177.89

preferences:
34.3 ms | 401 KiB | 5 Q