3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function mcrypt_create_iv($len) { $str = ''; for ($i = 0; $i < $len; $i++) { $str .= chr(mt_rand(0, 255)); } return $str; } $options = [ 'cost' => 11, 'salt' => mcrypt_create_iv(22), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n";
Output for 7.1.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/f70Wm on line 14 $2y$11$TmP6GC3PNzu4zYDE/ZVp..Jy/CcR4/Ak0nkgBPbCOI7ArY/QJwAda
Output for 7.0.14
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/f70Wm on line 14 $2y$11$WXFFAq1C/ee3xr63r6VywuxDmg427O8M0IwLvIuWAtv/AGmxLYFxG
Output for 7.0.7
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/f70Wm on line 14 $2y$11$hMeWCu9tZVU.1wYM./HvROrLrVLQZ1CY4jf7z76Wsbss5BpcqAx4q
Output for 7.0.6
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/f70Wm on line 14 $2y$11$.7yraYikwSH.DVJpsuljquOnmxbjgV1z7Di8ViMkqGpWUG3J4ZIsm
Output for 5.6.28
$2y$11$FIU1WsxVv1wOb9P01xLR.OEAOW.OcUU7iNQpuThTLaXl8TgHObMjO
Output for 5.6.22
$2y$11$dnojaaShcaDCuECTw.hrjOGQ.5A5phIYPXziEwOrbOL20V6P.7JXi
Output for 5.6.21
$2y$11$1Je/MJfwgxsAsZor89EmyObUrkkYUvUm8xZGxplOH5ipAl1ifC9l.
Output for 5.4.0 - 5.5.22, 5.6.0 - 5.6.6
Fatal error: Cannot redeclare mcrypt_create_iv() in /in/f70Wm on line 8
Process exited with code 255.
Output for 5.5.36
$2y$11$xO.8iKIK8bXukxn7S/svCuibH/ah0SlAWGY3c5MxS/fkSDIPonk/6
Output for 5.5.35
$2y$11$xgXDz27rIlhtzPXihKtPruwCqUQUH8hibp2xFfZZcP9Rx1qwkYP3y
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/f70Wm on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/f70Wm on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/f70Wm on line 10
Process exited with code 255.