3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $salt = '$2y$04$AVgigiF9sRGgbChVfkgZgg'; $hash = crypt("test", $salt); var_dump($salt, $hash); $salt2 = substr($hash, 0, 29); var_dump($salt2); $hash2 = crypt("test", $salt2); var_dump($hash2);
Output for 5.3.7 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(29) "$2y$04$AVgigiF9sRGgbChVfkgZgg" string(60) "$2y$04$AVgigiF9sRGgbChVfkgZgegE6yn1OP0pbO6JqXlP9SYTLnRlz1wxC" string(29) "$2y$04$AVgigiF9sRGgbChVfkgZge" string(60) "$2y$04$AVgigiF9sRGgbChVfkgZgegE6yn1OP0pbO6JqXlP9SYTLnRlz1wxC"
Output for 5.3.2 - 5.3.6
string(29) "$2y$04$AVgigiF9sRGgbChVfkgZgg" string(13) "$2rcByx51ejoM" string(13) "$2rcByx51ejoM" string(13) "$2rcByx51ejoM"
Output for 5.3.0 - 5.3.1
string(29) "$2y$04$AVgigiF9sRGgbChVfkgZgg" string(13) "$2vU67iv49YBo" string(13) "$2vU67iv49YBo" string(13) "$2vU67iv49YBo"
Output for 4.3.0 - 5.2.17

Process exited with code 139.