3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $caratteri_disponibili ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; $lunghezza= 50; $code = ""; for($i = 0; $i<$lunghezza; $i++){ $code = $code.substr($caratteri_disponibili,rand(0,strlen($caratteri_disponibili)-1),1); } $hashed_password = crypt('mypassword',$code); $input = "mypassword"; if (crypt($input, $hashed_password) == $hashed_password) { echo "Password verified!"; } var_dump($hashed_password, crypt($input, $hashed_password));

preferences:
37.72 ms | 402 KiB | 5 Q