PHP crc32() Function
PHP crc32()
The crc32()
function generates the cyclic redundancy checksum (CRC) polynomial of 32-bit lengths of the given string.
This function is usually used to validate the integrity of data being transmitted.
Note: This function may return negative integers on 32bit platforms as PHP's integer type is signed. So you need to use the "%u" formatter of sprintf() or printf() to convert the crc32()
result to an unsigned integer.
Example
Output
Syntax
Parameter Values
Value | Type | Explanation |
---|---|---|
str | Required | Specifies a string to generate a 32-bit cyclic redundancy code (CRC). |
Return Value
Value | Explanation |
---|---|
Integer | Returns the crc32 checksum of the given string. |
Reminder
Hi Developers, we almost covered 90% of String functions and Interview Question on PHP with examples for quick and easy learning.
We are working to cover every Single Concept in PHP.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.