crc32() function in php
Last Updated by Pooja Chikara
0 2858
PHP crc32() function is used to generate a 32-bit CRC for a given string. Here CRC refers to cyclic redundancy checksum. It is an inbuilt function of PHP.
Syntax:
crc32($string);
here,
$string is a PHP string.
To print the result by this function we can use either printf() or sprint() functions.
Note: To get the error-free correct string you should use %u formatter of the printf() and sprint() function.
Example:
<?php
$string="Ram's son goes to his school in the morning.";
$crc_string=crc32($string);
printf("%u",$crc_string);
?>Output:

Share:
Recommended Topics:
You May Also Like
PHP Examples
News letter
Subscribe To Never Miss an Article From

Comments
Waiting for your comments