3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function password_verify_with_rehash($password, $hash) { if (!password_verify($password, $hash)) { return 'badpass'; } if (password_needs_rehash($hash, PASSWORD_DEFAULT)) { $hash = password_hash($password, PASSWORD_DEFAULT); return 'rehash'; } return 'allgood'; } $password = 'thisIsABadPassword'; $hash = password_hash($password, PASSWORD_DEFAULT); echo $hash; $passwordTry = 'thisIsABadPasswordAndWrong'; var_dump(password_verify_with_rehash($passwordTry, $hash));
Output for 7.1.0
$2y$10$/B/C0XTGHYrYiGO8k/poberD9XtsDkqkBtjOjl7rRsNKi7z71SaPWstring(7) "badpass"
Output for 7.0.14
$2y$10$CwkUUiaqBl4yuSze8lK0s.G2vxJtrFc663GqRUvppbeV4vXpoO/castring(7) "badpass"
Output for 7.0.6
$2y$10$GnpWuGcZL8C2sR9FBjImZeSaM7wtARy1S9rIzVMuIVCaAxxkKIKwCstring(7) "badpass"
Output for 7.0.5
$2y$10$VZqlwDJI4MR7mbsI3.fmLO/DyJ6z5QGOnlMQXtaKR36QOhUQlpzNqstring(7) "badpass"
Output for 7.0.4
$2y$10$RAbR3uIrbMxvc6t2Mp6I/O8BFnncgKwdj6roG7D0S73eQ7iB5arVestring(7) "badpass"
Output for 7.0.3
$2y$10$cx3qGrQFCbRcgVwpsDq6ZOA2cMiYbE7rwZvFE/CoAwxeIYOWjHbsCstring(7) "badpass"
Output for 7.0.2
$2y$10$k5UHt1pcS6AQe5DDDc4HtOuEF6GL7Mqsb3N4rnDFn25PFbymzFwlystring(7) "badpass"
Output for 7.0.1
$2y$10$RmMeF3GAOWEjP87dn3n2l.YD9T/xHOzqcFZH3kPoMyrM2CzG0z6f.string(7) "badpass"
Output for 7.0.0
$2y$10$HpreYZLvvILUNX.cTYAL3OUvBGjkWYEz88RcoOSqf3dCTkHk2Win2string(7) "badpass"
Output for hhvm-3.12.0
$2y$10$kPnidHREd2A2sZqUujMY..Kmoysw6ojNlGKPI3yde7fbXYwVZnTuCstring(7) "badpass"
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
$2y$10$ycFsP0W9VyqxFNOoKr5s0.7IAET2I.YT/VLj5RsPmpvnJa33oyXQastring(7) "badpass"
Output for 5.6.21
$2y$10$X3oBhyO0dRNaTtZxYIg3puyngE.FrAWWmEVpQrhWqu9DKE6Py0icastring(7) "badpass"
Output for 5.6.20
$2y$10$t1tlqUO8GD1dnTGajUAckOBHwdusYJyyzFjIlkVPs.A9c5MK1z8MCstring(7) "badpass"
Output for 5.6.19
$2y$10$iiXp5XA7cyZOTftFF7JmKO/Edtf3znAJTV4wPj/o8lT3A3Ujx2EDestring(7) "badpass"
Output for 5.6.18
$2y$10$Dy1rwUa9YTTAUQVEU1VOK.PCTALrdUUewqFcAa2gYl0jt/1pAWJ1Cstring(7) "badpass"
Output for 5.6.17
$2y$10$Yb1B/G3MD68/XuufLn4muO85RuJmvS4HW/sTzIFZiwR69VQClAK3ystring(7) "badpass"
Output for 5.6.16
$2y$10$6/iuhwZrCZ6IyWrWlFJyKugB7O.Mg.iWqarVovmUKf25J/YDMF2N.string(7) "badpass"
Output for 5.6.15
$2y$10$/I/S8tKhhL4Xa8puIos7q.7RAjNYj6Qkz.aHfWzDiIOal4S.DWzLOstring(7) "badpass"
Output for 5.6.14
$2y$10$s959uBwdXxukfvMEP7y2.u1Tyf2G5NX8hGb4QtztVOywNh83UxASistring(7) "badpass"
Output for 5.6.13
$2y$10$0QLMpSZ2UW6XSnG7QmOmR.w7nipy/1eBM43Ynl3adfDT..vPkDRa2string(7) "badpass"
Output for 5.6.12
$2y$10$lsIXEb2.uiuH2BYmOSK25ur247Cnpz4oCofYGX5AykPzOPkiP8k32string(7) "badpass"
Output for 5.6.11
$2y$10$sGT625wGuM0KCt4wq5C1vO5M6n1Lkt06w4yJMd4NAbM1qsvDU.lSWstring(7) "badpass"
Output for 5.6.10
$2y$10$sfuEq6vwHBnmOWPaC8kEUevDFc2qnMsTOJDkzSccjHG1m1ieXvsY6string(7) "badpass"
Output for 5.6.9
$2y$10$my/AMslGFOrIkmsudCTGaOmMYlq4eR0dZzQVElMvcBVxbT3bDQy9Sstring(7) "badpass"
Output for 5.6.8
$2y$10$aGqibNmNEik9RraXM5VameaSXTnI4gKlgr66nbsphw4fX.V/kQtxCstring(7) "badpass"
Output for 5.6.7
$2y$10$q2tQNPKjjRX6mZOGfJHTkeUCSozIYn6YxI6qGdwf0o62CzCzYdpYestring(7) "badpass"
Output for 5.5.35
$2y$10$dj77miXPTRCm5/kpAZlvaO3Vj5hOdzQ1oVq3JxpzBq3wDvRoV84BSstring(7) "badpass"
Output for 5.5.34
$2y$10$t86zybaFRe4oLhXX6YgDGOfRaZJHFIzDkAbo0spOLwVQt/MPY6nEustring(7) "badpass"
Output for 5.5.33
$2y$10$DQFrYHmEcwp0FMBP529K9OhZ.rotx.6xX/AHiHInIClt3mXFh0nGystring(7) "badpass"
Output for 5.5.32
$2y$10$EixFiC.6vkskHtO6g5/j5eqSqVLtP2GjRCFcdKBXfhnTRby2BMPgestring(7) "badpass"
Output for 5.5.31
$2y$10$zI9dgEgejASradW7HCjA7e6/baCVnez822CWm2hu548iqKTYR83Cestring(7) "badpass"
Output for 5.5.30
$2y$10$1cOtmeCKnsH.tx9j.5oiIuWTSFzJfjIytkZ3oeQ6Bhk0LWc6bWbZistring(7) "badpass"
Output for 5.5.29
$2y$10$LwpPz9SP.1cPc7YVCKyyfOKKqQ.h3QycuoQjhf/eAkBV6DawM32rKstring(7) "badpass"
Output for 5.5.28
$2y$10$JPpSgWDdKM.OV/8xpOm6EuSy/t4ZMBcN/Zsq.Ww6vaUer7s5cY/DOstring(7) "badpass"
Output for 5.5.27
$2y$10$Z3rPJetlavyTtVCItapJae2piy1Df7EMbVAYpgqGS5WzWai6z7noustring(7) "badpass"
Output for 5.5.26
$2y$10$fsMnh/dyE51TVnAljJ/iRe2v24ssPlOOEyyXfYss8SbAk6ApbZoNOstring(7) "badpass"
Output for 5.5.25
$2y$10$yscClcufsl7QGaWUirlpMeLODt413VRAJGX8CxYFdjqPptMbBNglCstring(7) "badpass"
Output for 5.5.24
$2y$10$apugKLjcKrix.GNJtG.WD...idchNik5QX9zN7M8gD/CLbw2HpwMSstring(7) "badpass"
Output for 5.0.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/LLe9c on line 18
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: password_hash() in /in/LLe9c on line 18
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: password_hash() in /in/LLe9c on line 18
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: password_hash() in /in/LLe9c on line 18