3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt = md5('static salt'); for ($i = 0; $i < 5; $i++) { echo password_hash('reddit is fun', PASSWORD_DEFAULT, ['salt' => $salt, 'cost' => 4]) . PHP_EOL; }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.6
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Bklc1 on line 6 $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Bklc1 on line 6 $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Bklc1 on line 6 $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Bklc1 on line 6 $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Bklc1 on line 6 $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
$2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/Bklc1 on line 6
Process exited with code 255.

preferences:
89.08 ms | 401 KiB | 93 Q