Forum Moderators: coopster
Note that password_hash() returns the algorithm, cost and salt as part of the returned hash. Therefore, all information that's needed to verify the hash is included in it. This allows the verify function to verify the hash without needing separate storage for the salt or algorithm information.
// convert all UPPERCASE data to lowercase and then capitalize first
// words; also account for words after special characters
function fmtString($v)
{
return preg_replace_callback(
"/([[:^alnum:]]+)([[:alpha:]])/",
// PHP < 5.3.0
create_function('$m', 'return $m[1].strtoupper($m[2]);'),
// PHP >= 5.3.0
//function ($m) {
//return $m[1].strtoupper($m[2]);
//},
ucwords(strtolower(trim($v)))
);
}
print fmtString('HELLO WORLD!'); // Hello World!
print fmtString('hello-world!'); // Hello World!
Windows XP and 2003 support dropped
Support for Windows XP and 2003 has been dropped. Windows builds of PHP now require Windows Vista or newer.