3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function password_verify_with_rehash($password, $hash) { if (!password_verify($password, $hash)) { return 'badpass' } if (password_needs_rehash($hash, PASSWORD_DEFAULT)) { $hash = password_hash($password, PASSWORD_DEFAULT); return 'rehash'; } } $password = 'thisIsABadPassword'; $hash = password_hash($password, PASSWORD_DEFAULT); $passwordTry = 'thisIsABadPasswordAndWrong'; var_dump(password_verify_with_rehash($passwordTry, $hash));
Output for 5.3.0 - 5.5.0
Parse error: syntax error, unexpected '}' in /in/Z0Y1Z on line 6
Process exited with code 255.