3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /** * Note that the salt here is randomly generated. * Never use a static salt or one that is not randomly generated. * * For the VAST majority of use-cases, let password_hash generate the salt randomly for you */ $options = [ 'cost' => 11, 'salt' => mcrypt_create_iv(128, MCRYPT_DEV_URANDOM), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n"; ?>
based on CNg5T
Output for 7.0.6 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/bOEhh:10 Stack trace: #0 {main} thrown in /in/bOEhh on line 10
Process exited with code 255.
Output for 7.0.5
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/bOEhh on line 12 $2y$11$aKI/sAnuIvP0GXkHczrFD.yXnA/ruqIHRMcywS96/UJa5tpBusjiy
Output for 7.0.4
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/bOEhh on line 12 $2y$11$IiV1oPv2rSzegKsTFNSDK..CUjfYE32.229y92NhskrEV0c1Gs1kW
Output for 7.0.3
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/bOEhh on line 12 $2y$11$QuE9ZATVc0BBwfgAilp8YObK.5IT4DKMpwhS.Kc7ywM9Hvx.OaGxW
Output for 7.0.2
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/bOEhh on line 12 $2y$11$PIvnm/gazjt9EDQr0wnwcemx7no/OStCIrMkjcAlNuNv8XTvl4Z7y
Output for 7.0.1
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/bOEhh on line 12 $2y$11$GLgjExZawubhm2ED1JcIdOUw8rMoQVNUlkwhlj0emYhts8liXwmT6
Output for 7.0.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/bOEhh on line 12 $2y$11$ev/v1.iqJQVbLp5Gf4uHpeVuM.RLlhC5ug9RL1P6QGuy5TX7xaudq
Output for 5.5.35, 5.6.21 - 5.6.28
Fatal error: Call to undefined function mcrypt_create_iv() in /in/bOEhh on line 10
Process exited with code 255.
Output for 5.6.20
$2y$11$dx9OzeA858I4xa8C07cKj..MZ3.rtfBdMFQeeJoOIUcq2DEJo6quG
Output for 5.6.19
$2y$11$LXx3.UDOJ3NlvHehKowdAOD3xKv6yvd.G58jDTpSCvFX/mug/2YOe
Output for 5.6.18
$2y$11$jAMKBhneDlnt.W/Cd7P7eeCjCXFfVt7WNYwN6m.IFcWzA5z7Y0zEi
Output for 5.6.17
$2y$11$0UFvlLSakwP3fpSOA.JXv.lOHX2Rb366/kKmWj0KuSaHy7pbGkX82
Output for 5.6.16
$2y$11$ss6CbFoMdTmJGrVGCjKCsuryecqDndVdb2ZP9YAMPQKC5.7BdBaLC
Output for 5.6.15
$2y$11$bcxFiQXs8LCQHKDxUs/pP.Xu9fZ1edJcUkLTJGsAk2zOdLFO1HG4K
Output for 5.6.14
$2y$11$msMewrdDzz23FP93Cea0o.pwEGxh1cs7a0QErTaZ8pI6yVwjvQk6W
Output for 5.6.13
$2y$11$pwHYYzvTDKsPf90gWPkZpO9cH3KGUEPs6UVBXC/d5GrkzwUMtcRla
Output for 5.6.12
$2y$11$SPiIXvNV9ELr.jUCKZNa1emCSLrnQ7LjIUT3jocwuzKCFpX82B03i
Output for 5.6.11
$2y$11$TroCSbQV8C1Q/b0EzllbI.hYLdohy/Gxr0o1AyRYOdBQIH7BOJFnG
Output for 5.6.10
$2y$11$4S8a4ugAqkyrkUOYAUQgr.oirejWJm9LWbrwP8C2MuaA0Iw1hqw0C
Output for 5.6.9
$2y$11$T5QEC9pujRcwMllFw9CA.eTbnN49zdsMbwf00AiImQ/ABMXix9C6u
Output for 5.6.8
$2y$11$/ztOJox/mCBHjKX6E8EQd.Vk1lECUFa2ndDLmvKKVRwkdRY.v32aO
Output for 5.6.7
$2y$11$gzMN0QPkoFgvuNmDqQYM4ui42Vf1HXfCRNTo2hpquZarHD2s84JsO
Output for 5.5.34
$2y$11$yX9MqldJGnO4K4QduMqCyePMlDpLZ9eTbcxRts1D9uCMo0LHhOeDu
Output for 5.5.33
$2y$11$RNt05pu8IjW6U.56lks0AO8QrrvxByn5KnmCgLlcBDyXT4Y3TZ5qK
Output for 5.5.32
$2y$11$RJBURLzjKk3WhwGNkHse1Osa/GBh0PAEFQcBVRoAXGughue/4IVSS
Output for 5.5.31
$2y$11$EB5yyroyCTb.c91MWIJzC.0SB6P/s77P4AK44.JPgTKmnmhAacrd.
Output for 5.5.30
$2y$11$lFSCo9pawdvO.DmTmfoxHOqOCoJSomSj6LE/1GkuBRO5YmqjxFv1m
Output for 5.5.29
$2y$11$SpvFTWs2gDUxSpF4VH9oVeTP6ADS4iHc.CSBweTlRkh93kzxL78qW
Output for 5.5.28
$2y$11$2Fpp0X.5h8TGQG/KkHVA7ew2f8hErmBvAkjWaOp8rWlMkkKWXX8PC
Output for 5.5.27
$2y$11$VZlYr2RtMW56YvByDtarFuQR9GNs3Owi2hmjS1pX/bjI8loPIGLfS
Output for 5.5.26
$2y$11$u4hfVcd758ga6Je9.DVHaO3hWPUYSEGdKdoqyEneXT4Qjui38MSOK
Output for 5.5.25
$2y$11$oS7AnZDFKH.0KCk09yNsceTyNqQ21jmdcwyQ36mUftnaV1gbMm44u
Output for 5.5.24
$2y$11$gOkv/U9htahAt/e1tqp0oer75CZNC/HZl4cUaRr60efmvukZpqDS2
Output for 5.4.2 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/bOEhh on line 12
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/bOEhh on line 8
Process exited with code 255.