Warning: file_put_contents(): Only -1 of 46 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
count_chars crypt Strings PHP Manual crc32 (PHP 4 >= 4.0.1, 5) — Calculates the polynomial of a string Description int ( $str ) Generates cyclic redundancy checksum 32-bit lengths str . This i...
Forum und email

crc32

(PHP 4 >= 4.0.1, PHP 5)

crc32 — Calculates the crc32 polynomial of a string

Description

int crc32 ( string $str )

Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the str . This is usually used to validate the integrity of data being transmitted.

Because PHP's integer type is signed, and many crc32 checksums will result in negative integers, you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32 checksum.

Parameters

str

The data.

Return values

Examples

Example#1 Displaying a crc32 checksum

This example shows how to print a converted checksum with the printf() function:

<?php
$checksum 
crc32("The quick brown fox jumped over the lazy dog.");
printf("%u\n"$checksum);
?>

See Also