3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $username = 'RalphWestfall'; $password = 'freeman'; $hash = password_hash($password, PASSWORD_BCRYPT); echo "Hash: " . $hash . PHP_EOL; if (password_verify($password, $hash)) { echo "Valid"; }
based on v4tpG
Output for 7.2.0
Hash: $2y$10$uaZ3TBh6spxsEVxa2GmM/Obcp8jPeH0fu08WoJ6OLI5hSMZMfqBXm Valid
Output for 7.1.10
Hash: $2y$10$Fj4jxBet15w1tUGcoL1B9u6m1diVW3astoRgkGEGMODO44gsH2xu2 Valid
Output for 7.1.7
Hash: $2y$10$cqSObaIKsYRpGCNHn4YFfuF1.4Ri3EuAlvpO.Bkb5GizmHZKOeA2. Valid
Output for 7.1.6
Hash: $2y$10$kiK0Fmj3L0EnX/UQnZHhz.4WjXF/uRRK86qF2OkPr3J0XGD1nNVz2 Valid
Output for 7.1.5
Hash: $2y$10$LeZVt3tl3lGANcdvMfNsvu9Ef4feKcGynxCNf5e4EbLN43MWDcFSq Valid
Output for 7.1.0
Hash: $2y$10$nVdvxAe8uLSYGe8I.UxyW.VnQ69vP4LQxFO2MA1OGBHRXcYF/SytG Valid
Output for 7.0.20
Hash: $2y$10$H1Gz98Em2FBq5dnmrePFfeJ2DBOjG/Vr0zJBNtG8C7tLwTRhkGtoO Valid
Output for 7.0.6
Hash: $2y$10$UNsBwRqmW56qhetQticAfOCXcvS8xquzLp10wA1hRQTXcWN0SfiHa Valid
Output for 7.0.5
Hash: $2y$10$0/rULSQ6GUZZEdZVsMoHs.2GTo2z6y5Co.ofyM00JXcy8iCEpNSQa Valid
Output for 7.0.4
Hash: $2y$10$DPiZfmnPfIdRiX5NDF8Vle95LGEiD0nQaYLc2xiOhNlL6xAh.Pysq Valid
Output for 7.0.3
Hash: $2y$10$SJfYiNN1LFCtT6asiEFEJOqUTZnMrvUhepxaJ.h71u72rqbZpR1Cy Valid
Output for 7.0.2
Hash: $2y$10$838qibU7FKXV4hItyFq3tOiNQTyZB3bcbC7At9g65tDdsiZ0InKxy Valid
Output for 7.0.1
Hash: $2y$10$l0C6I8vzXAQWq9pvVXR6hewRL0AtSVJ6eO43tOwYpXcjNYLHYoK7i Valid
Output for 7.0.0
Hash: $2y$10$IRr/kmOBX2Wa03adIoBZCeBq0kFprXoVTDotFCcuinPP1gdw9.Lgu Valid
Output for 5.6.28
Hash: $2y$10$HqXstkj7CQzwRWPeBwRg6.Lmf.3J4BfazZfSbbHKg/CQ6kW9B1WdC Valid
Output for 5.6.21
Hash: $2y$10$TDEb9EFoTAdOuEfQxfH0.uKKtWYesILXWboWh4mQKbIZSwKT2GOfy Valid
Output for 5.6.20
Hash: $2y$10$BHFw96/PHd90zWPv8xV/cu1YF4UPY2/9HaylZ.1Zvxc1aixzDtg2S Valid
Output for 5.6.19
Hash: $2y$10$ebP9/bjgjPlvBFGj55FK4.GcD4ZSoiB3dCg0hwiTdmGUpvuysPw86 Valid
Output for 5.6.18
Hash: $2y$10$58NJRNA5XJNieiAEyUun0eqBbM3NNv2/qn6vDxkarXPdpipFk6kcq Valid
Output for 5.6.17
Hash: $2y$10$pMC.5.LUl8AA2xGfC5UwWO1LcYb9jDy0G4p5qz5dPFsxUk4gBFzwy Valid
Output for 5.6.16
Hash: $2y$10$qomhJaI55NXS6DW8Qd83gec/0bZRayzyhqGuWrPL2AOKMWE1wHHxK Valid
Output for 5.6.15
Hash: $2y$10$JuKA9iOWyMyDV9jgYGWVmuY6VclBinb/b3b5KPqYLYR993y9OCGjq Valid
Output for 5.6.14
Hash: $2y$10$vfyqnxw7xtgptlkkOIzlXOJQcV9M5wznlLbKy3pN..mp.gDe7hsLi Valid
Output for 5.6.13
Hash: $2y$10$WthAER0/JBLXEtYsWIbx6uZqVtNZGM09P6kC9YpH3Ry8yVCNt5q0. Valid
Output for 5.6.12
Hash: $2y$10$64qRxqbuqCI6jdkwqqcFReEFh88Ti8o35ud5BBPzXpDayOURUlhpC Valid
Output for 5.6.11
Hash: $2y$10$6q2qCbm/Y38idyfjxoW4Gu3mLw5hkZItORSbMK3aA6U.fohPSCKD2 Valid
Output for 5.6.10
Hash: $2y$10$G4faVLArkFFbJr7abscDQ.TmysveiFFBogbXH6aVAD62RifmJM07a Valid
Output for 5.6.9
Hash: $2y$10$ZcbTTkzk7WY0oRpcOHW2bOwM.xs6byFIYh9C/T9tbPLqXBgGr.lgi Valid
Output for 5.6.8
Hash: $2y$10$9ZYUvkQL6fXddtBrMvOGzO639AmqKRfQTk0aIsFsi9cLEW6XVfqCm Valid
Output for 5.5.35
Hash: $2y$10$0ep5EVOz2jiymjtSxCXPd.bwg1Jcp0d7qj6KjSD4ju9E6Ypx.YbE. Valid
Output for 5.5.34
Hash: $2y$10$EWbSQwBuJrGA/i6fuk2uEedsHhilNUEN.3OwO3Sa0nJ/fNK30GeJy Valid
Output for 5.5.33
Hash: $2y$10$5BarH40D9Mfwqzkfw9Oo6emp0m40xid94PwB/cAstY0E95/qWHqKa Valid
Output for 5.5.32
Hash: $2y$10$NhQwadwGw5bh/.oVIpJhNuA/oFcE9pQPYMP24jyOtzHIf8uKsZCNG Valid
Output for 5.5.31
Hash: $2y$10$VJlBR5dWjGs4RQz2/1SxdebpgMzsTlQSNTJYejoEATU/YiUMZSswK Valid
Output for 5.5.30
Hash: $2y$10$0Yp4MnRUcahVhZcThoh/tufDGYsrqM09KyiBFb3xPdnUHTbSTlgze Valid
Output for 5.5.29
Hash: $2y$10$f4CPri2oskgjgk0VOkSJbuh3ALVk1MmfjQaE71Sia.pYm3upWMOeq Valid
Output for 5.5.28
Hash: $2y$10$sN7Ow3csYEHLI7LX3XyPBOmjYNfUxvIqD5dW4C29vsW9m4slFMwT2 Valid
Output for 5.5.27
Hash: $2y$10$8UqUow2SD.GO2aGmQdhfxePv0hnFuy0QrERAT1kTboQsgvhqs.lvK Valid
Output for 5.5.26
Hash: $2y$10$2HMV9sDeEpZxznbxEia4NO9s6p1C.1HMYQbscpN4DrwoUDu2N/Eg. Valid
Output for 5.5.25
Hash: $2y$10$lqaCdbcXGxJlcFi5nq/kCOStrzrsDBz6Dac94O3M9UkWEEK.Q.wnG Valid
Output for 5.5.24
Hash: $2y$10$gNw.cLPASNLhOyMzn516sOAGKeE7uy4FLUOuWYhCzzuFoBYACw9lS Valid
Output for 5.3.20 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/rmQHq on line 6
Process exited with code 255.