3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt = md5('static salt'); for ($cost = 4; $cost <=12; $cost++) { echo password_hash('reddit is fun', PASSWORD_DEFAULT, ['salt' => $salt, 'cost' => $cost]) . 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/4fH7u on line 6 $2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$05$60eeb405ab7d5e80149a9uG/FNpFd7NR9C6LTd/TZpHWd9KsZ6J4G Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$06$60eeb405ab7d5e80149a9u4m/5twujI0rL0K7emwLaCTVuvVdbwmK Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$07$60eeb405ab7d5e80149a9uKCJ5dnAskdZNdWBh9ywz5jJhs7E7.3a Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$08$60eeb405ab7d5e80149a9uNzSqjPha28qbDUVZF7XHaOWYEnVkVdO Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$09$60eeb405ab7d5e80149a9u6nBRDtjA5gLPey9HU.Ya70Kf/pRI7lC Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$10$60eeb405ab7d5e80149a9uehaw3kr.JQA508o3M2d0xeM6UadV5Me Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$11$60eeb405ab7d5e80149a9u9uW0BymvadXcRrMVIMrVzS0yt6mrDUy Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4fH7u on line 6 $2y$12$60eeb405ab7d5e80149a9u3mh46qW5kTRUeLR.zIAhmkBjWYgK6kC
Output for 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
$2y$04$60eeb405ab7d5e80149a9unrwEAonENvjv3EdQu/W7M7EQTkh.tRq $2y$05$60eeb405ab7d5e80149a9uG/FNpFd7NR9C6LTd/TZpHWd9KsZ6J4G $2y$06$60eeb405ab7d5e80149a9u4m/5twujI0rL0K7emwLaCTVuvVdbwmK $2y$07$60eeb405ab7d5e80149a9uKCJ5dnAskdZNdWBh9ywz5jJhs7E7.3a $2y$08$60eeb405ab7d5e80149a9uNzSqjPha28qbDUVZF7XHaOWYEnVkVdO $2y$09$60eeb405ab7d5e80149a9u6nBRDtjA5gLPey9HU.Ya70Kf/pRI7lC $2y$10$60eeb405ab7d5e80149a9uehaw3kr.JQA508o3M2d0xeM6UadV5Me $2y$11$60eeb405ab7d5e80149a9u9uW0BymvadXcRrMVIMrVzS0yt6mrDUy $2y$12$60eeb405ab7d5e80149a9u3mh46qW5kTRUeLR.zIAhmkBjWYgK6kC
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/4fH7u on line 6
Process exited with code 255.

preferences:
81.64 ms | 401 KiB | 94 Q