crc32()函數(shù)用于計算一個字符串的 crc32 多項式
crc32(string)
生成 string 的 32 位循環(huán)冗余校驗碼多項式。這通常用于檢查傳輸?shù)臄?shù)據(jù)是否完整。
該函數(shù)可用于驗證數(shù)據(jù)的完整性。
它以字符串形式返回32位CRC
| 序號 | 參數(shù)和說明 |
|---|---|
| 1 | string 要計算的字符串 |
輸出 對字符串“(cainiaoplus.com)”使用crc32() 后的結(jié)果:
<?php
//對字符串(cainiaoplus.com)使用crc32()
$str = crc32("(cainiaoplus.com)");
printf("%u\n",$str);
?>測試看看?/?輸出結(jié)果
897733488