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(256, MCRYPT_DEV_URANDOM), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n"; ?>
based on mCjJD
Output for 7.0.6 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/fiMOI:10 Stack trace: #0 {main} thrown in /in/fiMOI 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/fiMOI on line 12 $2y$11$wLTl0CMZuY6vBfLJax6GBe7VYPWdatkkL5RLsECA0DouNIaMWqj5O
Output for 7.0.4
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fiMOI on line 12 $2y$11$JZwRW00hRoeoinO1jxV7ZuB/K5GjFHbEiw8Op1.o0tZNpBBkEVwei
Output for 7.0.3
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fiMOI on line 12 $2y$11$qDNiE0B9ldS5.5.1g70nneg4k2nEbk.NSYzyGxBx6nDu0UydLrKT2
Output for 7.0.2
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fiMOI on line 12 $2y$11$CoSHbmmjuR/mWEi732kOw.WQQO.iKEehJZqCA5T66g/63XNCnR/Eq
Output for 7.0.1
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fiMOI on line 12 $2y$11$AetoXuCMJ86JRYc2ofPDf.l2CQM9EtHU57fy34V/I/F2CP5haSrZO
Output for 7.0.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fiMOI on line 12 $2y$11$tUx0s2hy5lQbSUvVDdbY2uPu3IBcOFcIfom3rl5APjobsIw6Ketcy
Output for 5.5.35, 5.6.21 - 5.6.28
Fatal error: Call to undefined function mcrypt_create_iv() in /in/fiMOI on line 10
Process exited with code 255.
Output for 5.6.20
$2y$11$OgA/IPrBpW.lbg/FfESUeO2pJXoCqR3Oh8XYaMie3OdzanDOrXCOm
Output for 5.6.19
$2y$11$dCzPXH0eam/3yhO3M5SkuuVX45dII/2vf78nJMLOC0Jw11q.g1vj.
Output for 5.6.18
$2y$11$Vzn7c2CWlOCbWqq3W1KhC./l1CPXYjrHsPy1GXVIKclU.rbHPkOO6
Output for 5.6.17
$2y$11$HrcnvWRfW826swqBqOMfrutD8IKhtw5mWwGrSROYCZGV68gr4756y
Output for 5.6.16
$2y$11$98fxcA9rfFXPUOtmiJJ5TecJN9IWKMgE2Flv7jtnNIM1Rv8kiJdsy
Output for 5.6.15
$2y$11$KQ8JxraFxi.wJp3zQAq7qOfCdbC144LjpEjLGf3mXOhUzVMq/hryW
Output for 5.6.14
$2y$11$qxvJzbI84jpDcjQuyyai/Oc9uZXQKYw9ecrX.ifvmRhAjJcBUhxZ6
Output for 5.6.13
$2y$11$qsRtAFNPd.QILUQscCXn8ehooizcF9SzeLfprZVoBj3GwAio59nzm
Output for 5.6.12
$2y$11$2j90/9iRL4qYpUbX81lZeuENNxkeQa.mPeOeWA5qvL5hLX2OSRuou
Output for 5.6.11
$2y$11$CegVKN6rMs2Xwm1BVPX3LOLPcQZyf8n5WufxsED3AgIfIRr4wnLei
Output for 5.6.10
$2y$11$CtPyQwjLrzqyUCdbXjdtuuvl5n/AvdPAMaMkpIMi8KekuESybpyIG
Output for 5.6.9
$2y$11$dmDzMIcLlIbZ9LoP74BvyeVpU1i0hV5QY3XicQmdD1Nu52RUsqH6G
Output for 5.6.8
$2y$11$/Liv7pEABoOCCM6VEEcF1eJfcxhPYcGbh/1.Q4Av4kzd3WCYAb9Na
Output for 5.5.34
$2y$11$EtXYJVWI9Q/VIRE5wOVHzegtnCAFzLWcEQT1GLKlYmIQeHobbFntm
Output for 5.5.33
$2y$11$zlFf0M3gEZfQ/6l3Dy6CdOzM2bmLBmr0RlHXo0ZjuApN9xHnMyq5K
Output for 5.5.32
$2y$11$yK89d52vnxaSDxpLPTRrA.Ql.1LOwqx6JUoOWCQg3mq1rrrPRjM8G
Output for 5.5.31
$2y$11$Vp9m0FvE94kwgJkJ876n3uAv1E.NDowROvV3WeuoxwXlGSbQWpdcG
Output for 5.5.30
$2y$11$Q.G2fJbLT5fGPV05lFYiHeAvdDFiPoYD89F7iaDtR/H9O2Il.BPC.
Output for 5.5.29
$2y$11$1VOJTJ6uk9HF.tJmOAKkCuLqvPJq5M5ChoxEpYvtn1e3rzuzHUkZG
Output for 5.5.28
$2y$11$pDXFkY5KH1ceB7620XZ5G..yoOaPPJPpN75jVK4O9S79MOMxFbula
Output for 5.5.27
$2y$11$EjQO/M5fTGlbVZB7MA3mLOxMnBo6gIPWZnomgeP/WQHRIPL1BL8eC
Output for 5.5.26
$2y$11$3ddl3gyw5aEmP9wCVsVxZ.us3d9rKYPWeEhrKv0EgYOPhrkQPG6bS
Output for 5.5.25
$2y$11$qcqM8FYlToSA2zJCpruHIepfLWbxQ9JOLrEawTzEtQ1F76ho2RXNO
Output for 5.5.24
$2y$11$tuVn.a9.bDQj8HUtqybKJ.lvv/SYf.7OYRCp2j4q/dTrCybHQGeV6
Output for 5.4.8 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/fiMOI on line 12
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/fiMOI on line 8
Process exited with code 255.