I need help in converting C code into PHP. The following is the C Code:
static const U16 crctab16[] = { 0x0000, 0x1189, ... }; U16 GetCrc16(const U8* pData, int nLength) { U16 fcs = 0xffff; while(nLength > 0) { fcs = (fcs >> 8) ^ crctab16[fcs ^ *pData) & 0xff]; nLength--; pData++; } return ~fcs; } I have the fo