sparkmix
sparkmix

Reputation: 2499

PHP crypt returns *0 in different PHP version

I used crypt() for password on my site and I just noticed the code in server with php 5.6.40 it's fine but in 8.2.12 it returns *0

I noticed if I change the ! to something else then it works but I need to keep it the same as users password already been saved.

Anyone has the same issue and know why?

$password = "Test@1234";
$crypt_password = crypt($password, "aKsCg#ZTP6!$");
echo "crypt_password: $crypt_password <br>";

Upvotes: 2

Views: 78

Answers (0)

Related Questions