3v4l.org

run code in 300+ PHP versions simultaneously
<?php $setting = '$2y$4$'; $salt = '12345678901234589012'; // SAME SALT FOR ALL PASSWORDS, OMG, DON'T $str = '12345678901234567890678901234567890123456789012'; $passwd1 = $str . 'A'; $passwd2 = $str . 'B'; $hash1 = crypt($passwd1, $setting . $salt); $hash2 = crypt($passwd2, $setting . $salt); echo ($hash1 === $hash2 ? 'same' : 'unique');

preferences:
50.03 ms | 402 KiB | 5 Q