← All docs

hash_final()

Finalizes an incremental hashing context and returns the digest (hex, or raw bytes when $binary). Provided by the compiler-injected hash prelude in compiled code.

hash_final()

function hash_final(HashContext $context, bool $binary = false): string

Finalizes an incremental hashing context and returns the digest (hex, or raw bytes when $binary). Provided by the compiler-injected hash prelude in compiled code.

Parameters:

  • $context (HashContext)
  • $binary (bool), default false, optional

Returns: string

Availability

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

Internals

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