← All docs

hash_file()

Generates a hash value using the contents of a given file.

hash_file()

function hash_file(string $algo, string $filename, bool $binary = false): mixed

Generates a hash value using the contents of a given file.

Parameters:

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

Returns: mixed

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

Internals

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