Phpcrc32 calculates the 32-bit CRC (cyclic redundancy check) and crc32crc of the string. Phpcrc32 calculates the 32-bit CRC of a string (cyclic redundancy check) and crc32crc. note: in this document, the www.manongjc.comarticle499.html phpcrc32 function is used to generate the 32-bit CRC (cyclic redundancy check) of a string ), crc32crc
Note: This article reprinted http://www.manongjc.com/article/499.html
The php crc32 function is used to generate a 32-bit cyclic redundancy checkcode polynomial of a string. This is usually used to check whether the transmitted data is complete. This article introduces the basic syntax and examples of php crc32 functions. For more information about the coders, see.
Crc32 function compute the crc32 polynomial of a string
Basic crc32 function syntax
int crc32 ( string $str )
Generate the 32-bit cyclic redundancy checksum polynomial of str. This is usually used to check whether the transmitted data is complete.
Tip:To ensure that the correct string representation is obtained from the crc32 () function, you need to use the % u format character of the printf () or sprintf () function. If % u is not used, the result may be displayed as an incorrect number or a negative number.
Crc32 parameters
Parameters |
Description |
String |
Required. The data to be verified. |
Crc32 return value
Returns the str crc32 verification integer.
Crc32 function instance:
The second line in the example demonstrates how to use the printf () function to convert the verification code:
Online operation
Running result:
2191738434
Http://www.bkjia.com/PHPjc/1101616.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1101616.htmlTechArticlephp crc32 calculates the 32-bit CRC of the string (cyclic redundancy check), crc32crc note: This article reprinted the http://www.manongjc.com/article/499.html php crc32 function for generating the 32-bit circular string...