Function Fast_custom_index->crc

Definitions

sources/database_search.php

  • Calculate a CRC, effectively converting a string ngram to an integer hash of it.CRC-24 algorithm, to avoid compatibility issues with PHP's crc32.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str string No No required parameter N/A N/A String

Returns

  • CRC
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Calculate a CRC, effectively converting a string ngram to an integer hash of it.CRC-24 algorithm, to avoid compatibility issues with PHP's crc32.
 *
 * @param  string $str String
 * @return integer CRC
 */

protected function crc(string $str) : int