PHP crc32() Function

The crc32() function calculates a 32-bit CRC (cyclic redundancy checksum) for a string.This function can be used to validate data integrity.

int crc32 ( string $str )

Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the str. This is usually used to validate the integrity of data being transmitted.

Example -

This example shows how to print a converted checksum with the printf() function:

ParameterDescription
strThe data.

Return Values-

Returns the crc32 checksum of str as an integer.