3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php for ($i = 0; $i < 5; $i++) { echo password_hash('reddit is fun', PASSWORD_DEFAULT, ['salt' => 'abcdefg', 'cost' => 4]) . PHP_EOL; }
Output for 7.0.0 - 7.2.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4
Output for 5.5.24 - 5.6.28
Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4 Warning: password_hash(): Provided salt is too short: 7 expecting 22 in /in/RsQ61 on line 4
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/RsQ61 on line 4
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/RsQ61 on line 4
Process exited with code 255.