PHP crc32 Function

What is crc32 Function?


In PHP, this function is used to calculate the cyclic redundancy checksum polynomial of a string.



In the above syntax "string" is the input for which crc32 polynomial to be found, its usually 32-bit's in length for the given string, and its used to validate the integrity of data being transmitted.

Example :

$str = crc32("Hey how are you!");
printf ("%u",$str);
printf ($str);
Result :


In the above example the "u%" fomatter is used to get the correct result, otherwise it may display negative numbers.

PHP Topics

Ask Questions

Ask Question