English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP crc32() Function Usage and Example

    PHP String String Functions Manual

    crc32The () function is used to calculate the crc of a string32 Polynomial

Syntax

crc32(string)

Definition and Usage

 Generate string 32 Bit cyclic redundancy check code polynomial. This is usually used to check if the transmitted data is complete.

This function can be used to verify the integrity of the data.

Return Value

It returns it in string format32Bit CRC

Parameter

Serial NumberParameters and Description
1

string

String to be calculated

Online Example

Output for the string "oldtoolbag.com” uses crc32The result after () is:

<?php
     //for the string oldtoolbag.com uses crc32() 
   $str = crc32("oldtoolbag.com");
   
   printf("睵n",$str);
?>
Test and see‹/›

Output Result

897733488

PHP String String Functions Manual