3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* nul byte (\u0000) safe password hashing function based on password_hash (uses "bcrypt" algorithm). * Source : https://paragonie.com/blog/2016/02/how-safely-store-password-in-2016 by CiPHPCoder * Code: @Florent_ATo */ function safePasswordHash($password) { return password_hash( base64_encode( hash('sha384', $password, false) ), PASSWORD_BCRYPT, array('cost' => 12) ); } $password = '*********password-longer-than-72-characters-and-with-\0-sequence*********'; print safePasswordHash($password); ?>
Output for 7.2.6
$2y$12$qpRyjJIK9LmYmVIS2ahsuuXSQ/xg4gkxe2dLQ7GsecMXIKOfzivoK
Output for 7.1.20
$2y$12$RMI3AbmSCBIms/7RowIyeuVhxdFc7MUav5SkO9dempkcIgQdZwYGy
Output for 7.1.10
$2y$12$wclTgjKNo8Scrto/tHFkqedZo9DlnJBfHyGBfn2OEqZxR3.6cISZi
Output for 7.1.7
$2y$12$pa7c4ySTogW8BMV99p7Ov.UPMM.Pe6mW4EYcAcbCtYRxQSF8QvfgK
Output for 7.1.6
$2y$12$vGvNKoaL4VVLAhV.xOiMU.qvl7MQi6BOEYbV/tgjMGkfHMDsBpjT2
Output for 7.1.5
$2y$12$U6X0fFyGO6DI.TO6BUFBwOzEpGGsJ9Rrh/vLpB3/.LdEgq3UCKeU6
Output for 7.1.0
$2y$12$Cu1uVU.h2YRUQpGwv24uUuL0lxzKV3RS6ocACWjxPsmxgxU9Vl932
Output for 7.0.20
$2y$12$RVzfeSkOczlcvXBQG3lci.aJDmVYvb5IQE0yItN3y.5cLIQ5Bopma
Output for 7.0.9
$2y$12$roZvWlslIP8.cuWQiOPlguu6DTfBP6Mr2oom4G8hfaZKcP8u3wg9O
Output for 7.0.8
$2y$12$ZOXyZdhrwvrC0SX9AHvYF.x46jdZuQ4fy6pxPrXSD8QsGNcagIEzS
Output for 7.0.7
$2y$12$AQS4kPBR5HnSXSUyS56NsOfUmHJVxkyJ8Fk7tyGudWFA9f1XI9DJK
Output for 7.0.6
$2y$12$3VYsbdD..n6LW2Iq5foCSOEgsrEzD21XNydH8mPh4FVKpx1hB/inC
Output for 7.0.5
$2y$12$repvP0IA8uTtuMajC4OfpOVDid/rdpCSoV4Rt/hiAY5ZfaoHh0/Ny
Output for 7.0.4
$2y$12$QLbgFaLohWjEKid2loo8a.S7/xEk9yKZ1l7Ry93bFi720tCeWV5wW
Output for 7.0.3
$2y$12$ADBNHwjcLDYoWI.aHGZTCuYzFOTFA299eQ9qyBuZa0Py/zor7Jaza
Output for 7.0.2
$2y$12$yC9xXTEImHxf82MSXcaYOOPrqSI6/Omo./rhb2pIbv0EEMgEIcFDu
Output for 7.0.1
$2y$12$.LpQf3A8tlJGFBAxzs2B3e2CxWyRFhHyA5asSd2ujMsyLl4EzR0My
Output for 7.0.0
$2y$12$F0cNkS3D21VrXqSSSQA2Deomf9uYYcFU6zTQI0Kltxs2PBX7oZHxW
Output for 5.6.24
$2y$12$3O5nBNh2nGiDkPRKxz.JhuU2Dspv40Ba0IOKp5gBEVP0c3g8znsgi
Output for 5.6.23
$2y$12$K7aDmanJNNpvP8UpqXjo5O3NOgqY5BygdW/oHpXyXJObOyOZN7lv.
Output for 5.6.22
$2y$12$4XMNdQiPDawdz8OmBClbP.JQPpiBCNwffzNsR5QZjP.u6ssYgJtei
Output for 5.6.21
$2y$12$tuMdRXfiVHhbpmSNQ0aZbeZyh8gaSYaRSmIltynVwB.7p.HdDk0N6
Output for 5.6.20
$2y$12$5oAcTg1RBvPDWMqMxtZequTiKuY6vCwKjhMxrYTW8lWROVn1JEBPq
Output for 5.6.19
$2y$12$Pxxdma23JU.STz4MJrZt0OKxwianXcsDVSz/2z2cFeNMiYpGH3aIG
Output for 5.6.18
$2y$12$CIWvjJUYn9yxH1DQgOg3ie2WkDX6C3KRCRcNBkdnYnJkdfLhpWZ8O
Output for 5.6.17
$2y$12$c0TSY8Psc9Zrj9Hvca9obeCGvRBmI6pd6KTtWF1RvkzNTbbIKdO1G
Output for 5.6.16
$2y$12$VhnM8l86wyHXOXZoIJJ60uAbY9xNQp9.SlOK7xcdZx7fD/8e1pfV6
Output for 5.6.15
$2y$12$JlNdxpA1cXTCV9ySiBK5eOvGvOBxRx0.dxzEAu8ikPCXVWcVQPzBK
Output for 5.6.14
$2y$12$kb4vw6LymZKugcVMC3xee.x7ahcXjsOyuFUIaIGgA4.rVI.9cXZJy
Output for 5.6.13
$2y$12$51bU/.FqH.xWHEgk2ULDju9q9kPD9xF2kLrA73/suL8Uu8MzCzAiq
Output for 5.6.12
$2y$12$Q5WLw0ojHeFN7Iv7lxn2qOBjF4kiyIfGNE9JCy.igyJTk0RgoR2qC
Output for 5.6.11
$2y$12$8eDmHZ2ZtNaXI3AnPYtmzOD5pnC7WiBAyAXK6InLyrpoYtmSuPjb6
Output for 5.6.10
$2y$12$OkKOrrjyJPkPn0201KCrM.xX33TG5Fev3gZuWD0STYjT00ApQxIE2
Output for 5.6.9
$2y$12$fQlJxsaqP1eMIlcTVY8haO178XEkxNDMI7/emrWYpNvjresAoCHFK
Output for 5.6.8
$2y$12$ELDw.EIxfsY3Z9VOkjVu8uFRKYR5pK1oK4Jtynee0EvLhrOwDXHcO
Output for 5.6.7
$2y$12$trcMOENPdNkMmRnIDDpNjeFXexbrbcqi5eTKs/O97TndXq8Cp60VG
Output for 5.6.6
$2y$12$n74bb3FUJoop194M03eGV.w3CiSl1naoxrDLz9K8K2Cvuoug/4OTG
Output for 5.6.5
$2y$12$oP9mnAM2YLB9OZ9Z8Ha3QudHX8D.gtJDfRljL6ASgkIKRhKnNwlEy
Output for 5.6.4
$2y$12$zAVPM5X5.mZNjvM1ecaqweR3wkcoIUgr2GMJSREV19adYOcXMLy0q
Output for 5.6.3
$2y$12$6NEW.wWu5PoD2.AE8gmpR.FYeqH7xj5Qr9YfZYQ84WrkBsc1uMBu6
Output for 5.6.2
$2y$12$2cQj4ExCDZslffkR5bEQ0.VDQb.ZtapBHC5cRXe9hhYJNoA7l8dcC
Output for 5.6.1
$2y$12$8xHmIHUVnmuO/SEnSU2UjOC61yRPhFYghSMEjCI9l5iRz1vvhS8OG
Output for 5.6.0
$2y$12$RFPpRlqpgXTiUvR82x/5Zedof4OIL/cfOdzhvEVm7h/0uSjpXoNIG