1--TEST-- 2Test normal operation of password_needs_rehash() with argon2 3--SKIPIF-- 4<?php 5if (!defined('PASSWORD_ARGON2I')) die('skip password_needs_rehash not built with Argon2'); 6?> 7--FILE-- 8<?php 9 10$hash = password_hash('test', PASSWORD_ARGON2I); 11var_dump(password_needs_rehash($hash, PASSWORD_ARGON2I)); 12var_dump(password_needs_rehash($hash, PASSWORD_ARGON2I, ['memory_cost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST * 2])); 13var_dump(password_needs_rehash($hash, PASSWORD_ARGON2I, ['time_cost' => PASSWORD_ARGON2_DEFAULT_TIME_COST +1])); 14echo "OK!"; 15?> 16--EXPECT-- 17bool(false) 18bool(true) 19bool(true) 20OK! 21