September 2001
Intermediate to advanced
768 pages
32h 45m
English
int crc(string string) Calculates a 32-bit CRC for a string.
Returns:
Signed integer CRC
Description:
crc32() generates a 32-bit cyclic redundancy code (CRC) for a string.
Note:
For more information on CRCs, visit www.foldoc.org and search for CRC. Many entry-level computer science texts also contain information on CRCs.
Version:
PHP 4.0.1+
Example:
<?php
$file = __FILE__;
// Read the file into an array
$data = file ($file);
// Join the array into a string
$data = implode ('', $data);
// Calculate the crc
$crc = crc32 ($data);
echo "The CRC for file '$file' is '$crc'";
?>
|
Read now
Unlock full access