PHP code example of minms / crc16

1. Go to this page and download the library: Download minms/crc16 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

minms / crc16 example snippets


use function Minms\Crc16\crc16;
# or
use  Minms\Crc16\Crc16;


# usage
$result = crc16('1234567890', 0x8005, 0, 0, true, true);
# or

$result = new Crc16($str, $polynomial, $initValue, $xOrValue, $inputReverse = false, $outputReverse = false);
echo $result->toInt();
echo $result->toString();