3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $username = 'tes2t'; $password = '1234'; $hash = password_hash($password, PASSWORD_BCRYPT); echo "Hash: " . $hash . PHP_EOL; if (password_verify($password, $hash)) { echo "Valid"; }
Output for 7.2.0
Hash: $2y$10$OXuFf3IA3dneTOC734ZGL.GIahEq0EeYDDxrR2b7bokz1mRUZCIrK Valid
Output for 7.1.10
Hash: $2y$10$jtGvIDlifQ/nEmMfsNrKL.3.4yQrnUXeAnaGWqxRCn8FC8uOj296. Valid
Output for 7.1.7
Hash: $2y$10$ll.7HTb.Q03GMVKezk0F1O0aCEnVGPAar40v2hFWnPq/4HlMZ4fSe Valid
Output for 7.1.6
Hash: $2y$10$hRMCSjvSoR9tsHhaLB25COFb1yVyiyT3btKtnY5HbQcw2oVWs3KhK Valid
Output for 7.1.5
Hash: $2y$10$xSkL6eFzaN8F7TnUJ6CZJea17jpbgbZXjmM5aZ4O7vXxIVL0UxfkK Valid
Output for 7.1.0
Hash: $2y$10$7gMkQ7VtZvi3bTs6U8KjT.14HdmTNxG.RfJuOqUjT2qB15Jk42sz2 Valid
Output for 7.0.20
Hash: $2y$10$qMKMb.RhfJEvHAaeSvguhOrCX5qxIUSt/x1NMgK6i3PaQpwtl56CO Valid
Output for 7.0.6
Hash: $2y$10$mHkHgip5H1VFg3dueEGdH.6rCEgN6pJ2egz8REkahCNiQq.yqi.72 Valid
Output for 7.0.5
Hash: $2y$10$k9UNjL/Roo050HI5RICcH.2AOLm5ht16f59ITbnshTV0nl1hRnCiC Valid
Output for 7.0.4
Hash: $2y$10$aIoz25riYe5x2OhKRcTFbOdUjNOBQ.vek59COIqVcUpT3aypm.lYO Valid
Output for 7.0.3
Hash: $2y$10$zvf2oymz7NFjKeR1eTrXFe6Apfsy/YMZloSY6xoSGMHpJmrihWom2 Valid
Output for 7.0.2
Hash: $2y$10$v5guGNV7bzspEFj4Z20kNeAxNrytdvlX7T3YApd3P/TZG1Mhb9rqC Valid
Output for 7.0.1
Hash: $2y$10$OzyTJqIeS0QI1tz2K1HL3uQQW1KPqEDd7AeJAvb5i6dcaWfARbmMm Valid
Output for 7.0.0
Hash: $2y$10$VKMpcbVtq2dTV/.IOD.8xuxaskvtZcZX1tgqAcyYV5lbgFfKqvBuC Valid
Output for 5.6.28
Hash: $2y$10$4fsmLQi05Svj6A19hM1lZOjZwd1rV36Z2m5KjCkDHWBZ2wbf4fWr6 Valid
Output for 5.6.21
Hash: $2y$10$j55mYPNc9imAv5T9nkWnnuquzQIM.6Av8BxoR8Vy2XkqWOprx5sRK Valid
Output for 5.6.20
Hash: $2y$10$yKGCGrqu4I4Hghq6ROWoHO8P9wiLSr9zkfOhLcqZokJmk176NMsfO Valid
Output for 5.6.19
Hash: $2y$10$LcM.7xnsOKGa5qBE6iIUdOIvanIStmL8BfDjasHFJRt0qLNd0NW4a Valid
Output for 5.6.18
Hash: $2y$10$fnrGYpRjPHqSMxJuJg.wxOLAopXiVuiykSTTZtn49gWN4pivfRMnC Valid
Output for 5.6.17
Hash: $2y$10$qPV3cXHgbGJQkw5dAStV/eShsUk1lRGh27JjpnTY5PkkEyjqFiFwi Valid
Output for 5.6.16
Hash: $2y$10$jqu9Vc.Wz4L3rTuSZPBiXOAsmYE9N8s6WdXV3T3y0X0dNS/tTI0zG Valid
Output for 5.6.15
Hash: $2y$10$ObmVAPxvFHBWOcYDPxNRcepqDs7OOGAgXV1a1i1SrWXAFhbtYy1R. Valid
Output for 5.6.14
Hash: $2y$10$2KZwMyKND8ZL5J3yqKO.muZmCHIgmyrd8qvgaTefoPNX/6FyqFeG2 Valid
Output for 5.6.13
Hash: $2y$10$f2JJ/4mfZ3HqdzmFtMcAHOT/XEt1S06RBmr1chTDCR2xn3I8rwHaa Valid
Output for 5.6.12
Hash: $2y$10$Zzel.PTOvMITT5E4mapnYuBK/bE.BMLrybnxwBXxKLaOF/NT5btDG Valid
Output for 5.6.11
Hash: $2y$10$h19JeHx/mQHd4SQalK0.Tu1ognHeQmyiIyC5Y03NuHPPvZGi4uknG Valid
Output for 5.6.10
Hash: $2y$10$.Rtz2gRlO0icvTKobr6oXeo2XKx.xTNC/MNH.wV.BzttLxXgUzrv2 Valid
Output for 5.6.9
Hash: $2y$10$nNAQXQLdyFDhP39W30kLpex10LJV6rViimCmSFuHSUcyxQU1wMiay Valid
Output for 5.6.8
Hash: $2y$10$MIwv1KZg1thfH94Ol8Ry2.ximUiHFt2MZdaVbqwjq.1.qr6QGkOwG Valid
Output for 5.6.7
Hash: $2y$10$uMneXXu2kKoI0dGIFnnjxOcZkyyd8WYeT4BymsGpthVvE5GLZkVq. Valid
Output for 5.5.35
Hash: $2y$10$PtGfG3qMqt60BNuKptoiLulz19OaQtWWVzDDYC.Ihi/n56XfGqmhi Valid
Output for 5.5.34
Hash: $2y$10$YflO9UpX2jDJ4gyev//oPOBdKbzVXBq3IDacIMWixzsHCUXdiztq6 Valid
Output for 5.5.33
Hash: $2y$10$oklojbl2jDTVryb37.BXWOUAfSXKgS6IobVjIsRi9bJ5ylB1PJdoa Valid
Output for 5.5.32
Hash: $2y$10$y5dHPXrlW3YQHkfcyVcqS.qf9HUP66GwR0jCbD217YaDBkAzrSaXW Valid
Output for 5.5.31
Hash: $2y$10$Vvx9uAeCwvVmqxh6shDto.R8b1cbYnk3lCZdw0.aVGJOZ0VNMcNuG Valid
Output for 5.5.30
Hash: $2y$10$qs2XpPvtB.02iR8HacPOV.HnEtCB9tHeDxOgSmUlEIVHN4PdhL0YC Valid
Output for 5.5.29
Hash: $2y$10$iJl98TN9Fbx/Pp3rkik.Jey2TUQMipf9kgt2gDvOGczsUN/0EPH6q Valid
Output for 5.5.28
Hash: $2y$10$PJOM2QMPjCb9cuhqCClrpen2y7SKtTwH.z0tep7X/5.CB7lUqYI96 Valid
Output for 5.5.27
Hash: $2y$10$./oLReWQc/ZAjApP4EHZlOXFhxxEddP80v5SB7zA85SjLMnMeWnXC Valid
Output for 5.5.26
Hash: $2y$10$XqUulXIRBoXbczmENAUThOJ2Z125H4Z1CbyUWNcViZO2J3bNEjShC Valid
Output for 5.5.25
Hash: $2y$10$kdIeJVAdveoToabXk6IVA.qe4fSv4ZvGRBw9sM9xWj6mKYgM5e9hW Valid
Output for 5.5.24
Hash: $2y$10$dJSB/bhQ.nqSwhGba.vC2.1CW4AgavPCY./gV2b46uPf8.uemTSBW Valid
Output for 5.3.18 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/v4tpG on line 6
Process exited with code 255.