← All docs

hash()

Generates a hash value using the given algorithm.

hash()

function hash(string $algo, string $data, bool $binary = false): string

Generates a hash value using the given algorithm.

Parameters:

  • $algo (string)
  • $data (string)
  • $binary (bool), default false, optional

Returns: string

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how hash is implemented in the compiler, see the internals page.