crc32() function in PHP || PHP crc32 function
×


crc32() function in php

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:




Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments