← All built-ins / crc32()

crc32()

crc32(string $s): int

Parameters

NameTypeDescription
$sstringinput data

Return value

CRC-32 checksum as integer — detects accidental corruption.

Example

$c = crc32("holy");
echo crc32("holy") == $c ? "stable" : "unstable";
stable

See also

md5()sha256()