← All built-ins / sha256()

sha256()

sha256(string $s): string

Parameters

NameTypeDescription
$sstringinput data

Return value

64-character hex SHA-256 digest — the standard hash of this runtime.

Example

echo sha256("holy"), "
";
echo sha256("abc"), "
";
1551d1eb020a113540d8ceb787d53b17750037ceeade4ceeafb67919ebbd7265
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

See also

sha1()hash_hmac()password_hash()