3v4l.org

run code in 300+ PHP versions simultaneously
<?php $setting = '$2y$04$'; $salt = '1234567890123456789012'; // SAME SALT FOR ALL PASSWORDS, OMG, DON'T $str = '123456789012345678901234567890123456789012345678901234567890123456789012'; $passwd1 = $str . 'A'; $passwd2 = $str . 'B'; hash1 = password_hash(passwd1, PASSWORD_BCRYPT, array('cost'=>10)); hash2 = password_hash(passwd2, PASSWORD_BCRYPT, array('cost'=>10)); echo ($hash1 === $hash2 ? 'same' : 'unique');
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '=' in /in/G0Z3F on line 10
Process exited with code 255.

preferences:
194.63 ms | 1395 KiB | 62 Q