1--TEST-- 2Test error operation of password_needs_rehash() 3--FILE-- 4<?php 5//-=-=-=- 6var_dump(password_needs_rehash()); 7 8var_dump(password_needs_rehash('')); 9 10var_dump(password_needs_rehash('', [])); 11 12var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT)); 13 14var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo")); 15 16echo "OK!"; 17?> 18--EXPECTF-- 19Warning: password_needs_rehash() expects at least 2 parameters, 0 given in %s on line %d 20NULL 21 22Warning: password_needs_rehash() expects at least 2 parameters, 1 given in %s on line %d 23NULL 24bool(false) 25 26Warning: password_needs_rehash() expects parameter 1 to be string, array given in %s on line %d 27NULL 28 29Warning: password_needs_rehash() expects parameter 3 to be array, string given in %s on line %d 30NULL 31OK! 32