crc32() function in php
0 2193
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:
Comments
Waiting for your comments