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); ?>

preferences:
32.29 ms | 402 KiB | 5 Q