fork(7) download
  1. <?php
  2.  
  3. define("SALT", uniqid());
  4.  
  5. $senha = "151201";
  6.  
  7. $hash = crypt($senha, SALT);
  8.  
  9. if (password_verify($senha, $hash)) {
  10. $teste = "Senha correta";
  11. echo $teste;
  12. } else {
  13. $teste = "Senha incorreta";
  14. echo $teste;
  15. }
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
Senha correta