3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $h='$6$qNElXs2yMnL2.GNS3kiM7DqmGbFLdQfIwu2691aJgT3xgJazPLtw7RPKz3Dp8RIc4b5fmJ7qvlq/mPN8a.rE40'; $p='salasana'; $c=crypt($p,$h); var_dump(CRYPT_SHA512); echo "HASH: $h - CRYPT: $c\n"; if ($c == $h) { echo "MATCH OK\n"; } else { echo "NO MATCH\n"; } ?>
Output for 5.3.2 - 7.1.0
int(1) HASH: $6$qNElXs2yMnL2.GNS3kiM7DqmGbFLdQfIwu2691aJgT3xgJazPLtw7RPKz3Dp8RIc4b5fmJ7qvlq/mPN8a.rE40 - CRYPT: $6$qNElXs2yMnL2.GNS$M5.2gPj6eNyxfgYeB5hDHaOB8gcYxrA5Y0WK0D19FXkMG3GXDvfeVz.9/kO5zCzJ9t3DEjfNY6z6gE0HuG1P6. NO MATCH
Output for 5.3.0 - 5.3.1
Notice: Use of undefined constant CRYPT_SHA512 - assumed 'CRYPT_SHA512' in /in/mOrKM on line 6 string(12) "CRYPT_SHA512" HASH: $6$qNElXs2yMnL2.GNS3kiM7DqmGbFLdQfIwu2691aJgT3xgJazPLtw7RPKz3Dp8RIc4b5fmJ7qvlq/mPN8a.rE40 - CRYPT: $67LnUJQ6bIYg NO MATCH
Output for 4.3.0 - 5.2.17
Notice: Use of undefined constant CRYPT_SHA512 - assumed 'CRYPT_SHA512' in /in/mOrKM on line 6 string(12) "CRYPT_SHA512" HASH: $6$qNElXs2yMnL2.GNS3kiM7DqmGbFLdQfIwu2691aJgT3xgJazPLtw7RPKz3Dp8RIc4b5fmJ7qvlq/mPN8a.rE40 - CRYPT: $6$qNElXs2yM$oXaV9bE0wauChxbV2SwDNOySPWRBZCi7bcHI.inqmPuHdXd26xuaCW0Xo/nks.BLSgJFJgEZxcGNyu.o/1gp50 NO MATCH