How to use crc32 in PHP
In this article, I will explain how the crc32() function can be used in PHP.
crc32() function in PHP
- The crc32() function is used to calculate a 32-bit cyclic redundancy checksum for a string.
- The crc32() function can be used to validate data integrity.
Syntax
Parameter
- string string is required parameter. it is determine string to be calculate.
Example
The following example show to how the crc32() function can be used in PHP.
<html>
<body>
<h3 style="color: green;">crc32() function example in PHP</h3>
<?php
$string = crc32("C-sharpcorner");
echo 'C-sharpcorner Without %u: '.$string."<br />";
echo 'C-sharpcorner With %u: ';
printf("%u",$string);
?>
</body>
</html>
|
Output
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here