3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $username = 'test'; $password = '1234'; $hash = password_hash($password, PASSWORD_BCRYPT); echo "Hash: " . $hash . PHP_EOL; echo strlen($hash) . PHP_EOL; echo strlen(md5($password)) . PHP_EOL; if (password_verify($password, $hash)) { echo "Valid"; }
Output for 7.2.0
Hash: $2y$10$3NZ2.LX4Z.SRHpaVLCYM7OofHSwr9HUjCl10jaWxM9/wIqIbXE5FG 60 32 Valid
Output for 7.1.10
Hash: $2y$10$hbssU97W0gvsFDSzWk2C9O.bsuadRlI7gYKf5UaqBprI3iqK0BO.m 60 32 Valid
Output for 7.1.7
Hash: $2y$10$3XM2JbJ6rKyAnEN/R1QZi.L1TEm1Ozm/9C2qt1rs.VrBclJmAkSuu 60 32 Valid
Output for 7.1.6
Hash: $2y$10$.5pdzptmLXzOABs9etRVueKluDQxZYvLiVkp4b3b8YzgojcHMKbJ2 60 32 Valid
Output for 7.1.5
Hash: $2y$10$fEpw9q7i0KsfQ/PqTGfMjeq1AYew2fw..Q/pZvkK0PKlm838YldYq 60 32 Valid
Output for 7.1.0
Hash: $2y$10$6znNWgB/8fFISxEHMWLfM.TbLQqqWp88MBGSd.ynPBJwmOyWDnr46 60 32 Valid
Output for 7.0.20
Hash: $2y$10$IOgHpARIuj85bKtaSahzUOEhaRb2PAXKRfUorLqnTKUN3DcTYJzia 60 32 Valid
Output for 7.0.6
Hash: $2y$10$ZZ9WjfMQ4vp8dLMu4wdVvelpb64q3rcCOjYMQ2J/fWaOS8.VL422u 60 32 Valid
Output for 7.0.5
Hash: $2y$10$nCV/e7jKA/pAtxFxnNOla.x/ZIer2EgUByqPNzPThVQnOk/hFaYg. 60 32 Valid
Output for 7.0.4
Hash: $2y$10$Gb2pQwyJj.CGHF/2PsjTPemVgTSqvlZZqrDGzKaIjJfiWsbPoIrvG 60 32 Valid
Output for 7.0.3
Hash: $2y$10$eNZtW4utLD8N9vz/51HcquFucQXHgGSUiIIS.V9t1JJla6c11MjHG 60 32 Valid
Output for 7.0.2
Hash: $2y$10$Q5Ad0sEPd3eV429PdjrKoeVehcF8HJ.7wuMEzV3DcFFhgOCwLGsZW 60 32 Valid
Output for 7.0.1
Hash: $2y$10$X447DubYK.BmdPMnVaRm0OBgfaciOR6ON3c7epx0mvHq0ehORkyJ2 60 32 Valid
Output for 7.0.0
Hash: $2y$10$obPC5sDrNLnUeGrtkVDxS.EwtdRRdIQEo.m2HGqUDmmCnO6VMBHbW 60 32 Valid
Output for 5.6.28
Hash: $2y$10$iCXKR3bGLjMbDQ1aRO594.BEesh7Mj8vcxfbDbNcita.2TxuLf1xS 60 32 Valid
Output for 5.6.21
Hash: $2y$10$NT63MBZgmCTmTT1TaSxPiu/Q0J9AAlpb5jJUVFguNgGPAIU1Gr83m 60 32 Valid
Output for 5.6.20
Hash: $2y$10$uA4p6/SK.fpN7lH2CF7xZe25sEKjPuN0Y7dYKFiwDL0FTzphhJfkG 60 32 Valid
Output for 5.6.19
Hash: $2y$10$nJsuZjVJ0qCMmV7RG5RB1u13dBH/wPtZABwwX3xIbD9TdddlnuQqm 60 32 Valid
Output for 5.6.18
Hash: $2y$10$e1ndBVr00AC3c7N3VheQMOT4g8I.SzGMgnHjXNndpw6u.1WaH9pxW 60 32 Valid
Output for 5.6.17
Hash: $2y$10$WVlt/uAo9oLFrZHnjy8BSuhNkz1R0STH82mqbFeDzI4.wFjBwAkga 60 32 Valid
Output for 5.6.16
Hash: $2y$10$5.ji/s6vkkl3TojV0P89EOxeqCKcouAbD/UbuRA9JR5glEsJG4O0G 60 32 Valid
Output for 5.6.15
Hash: $2y$10$NsifcZSxyJHIzKi06uBtKuK97eoqVGn/y.wpJ.W70cyJ7FsD9w4ka 60 32 Valid
Output for 5.6.14
Hash: $2y$10$9DaiH5S4DKR7zADY18x/j.Ib6k2CEJVZQPw0B.1ya6Edihb/aJTyC 60 32 Valid
Output for 5.6.13
Hash: $2y$10$Hb7d5s.s2jrSWNQuiX4Wy.1nKmJ8HOZAcqyc6hKkzuIckI3sZQhK6 60 32 Valid
Output for 5.6.12
Hash: $2y$10$HPMtZ9fPwEiWHi07idzxOelPHHdylo.JwQ1Zgo4kL.NuHf.Oql6Vi 60 32 Valid
Output for 5.6.11
Hash: $2y$10$UOS48zbGZjy70HJbTFonOuvSmpjRlnRLpXaPbENTEip.amX6ceoKy 60 32 Valid
Output for 5.6.10
Hash: $2y$10$kOtSz6dLSg3KC2OcKTc1F.WFdS25pzwLTRsJ///o53j0y.L.jAYm6 60 32 Valid
Output for 5.6.9
Hash: $2y$10$1.g4rvy7gGZzH9bg62qm2eFVwT7NextNZSEr6iOHzsVStK.ponni6 60 32 Valid
Output for 5.6.8
Hash: $2y$10$f3lhs7f1JP7DIRc..SIeTurvnZCMkU//5FWqcTfRiSrhzXD7Uz9gy 60 32 Valid
Output for 5.6.7
Hash: $2y$10$2MuqEjfQLuD.epL3Yk7GtOrQ9mwKcwo1xLqa4I68G4yHASQ6xPXhu 60 32 Valid
Output for 5.5.35
Hash: $2y$10$OYZ3ajyxNngWgYXr3qjKUutnRisbIGNa02sU.FwV8RRER9Sz67iGK 60 32 Valid
Output for 5.5.34
Hash: $2y$10$LjZDj5Moxp3MLEd1nUkmZO4PbusPfHj8auSiBFtmJrveDCPvN0Kmy 60 32 Valid
Output for 5.5.33
Hash: $2y$10$uZycV7Ns7PqwGCfHbWozyeZQ5lvN8i.OfCr7.8p2Ij5cAEwfZu31. 60 32 Valid
Output for 5.5.32
Hash: $2y$10$ztymfCkQfO0.4DzN.JmmtOx9xunFLNGxJkwDpsbTfbVIGv2IpL/le 60 32 Valid
Output for 5.5.31
Hash: $2y$10$Ya7u48N13oA152i47AUsgOzC6t5nnV097JlG8E7Pv7jpUopTsEmfa 60 32 Valid
Output for 5.5.30
Hash: $2y$10$tlZuR2WDm3iCX3jPIF2erODJF7THvZbGG2YvShYaayE9MFB9lyYEm 60 32 Valid
Output for 5.5.29
Hash: $2y$10$IMPr97vds/rSls/vr4OI8ezVagUjK4pdP.C/YGvRXRsoLU03b5wtW 60 32 Valid
Output for 5.5.28
Hash: $2y$10$AM0W7clCDVpxsZ.Xfpg90OtRDyeHpVQiNv56iLPg7xHQy5qzA7WVi 60 32 Valid
Output for 5.5.27
Hash: $2y$10$IYFEyO.dwgISuRVD.lawKe0S/TiwDiGjVBI20Xar2H1PXjLgjqCpq 60 32 Valid
Output for 5.5.26
Hash: $2y$10$1YB9BOD3zInQsS6dmCcMOuolzXNGxsBuF81j/ei9VG1KzGHFNIE52 60 32 Valid
Output for 5.5.25
Hash: $2y$10$8jHb5IB.n91ulY3LQ1Lt3u9mpCAUfoOxhupVrdkbJ8Goqkh/GSqY6 60 32 Valid
Output for 5.5.24
Hash: $2y$10$xgmnq8KRpyIbvCfSmM0xm.TbyBskP2SLbPCuBi8F0s98wp4A3GQla 60 32 Valid
Output for 5.3.18 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/ClL4j on line 6
Process exited with code 255.