QuickHashStringIntHash::saveToFile
PHP function
Edit on GitHub ✎
This method stores an in-memory hash to disk
Description
QuickHashStringIntHash::saveToFile(string $filename): void
This method stores an existing hash to a file on disk, in the same format that loadFromFile() can read.
Parameters
filenameThe filename of the file to store the hash in.
Return Values
Void
Examples
QuickHashStringIntHash::saveToFile() example
php
<?php
$hash = new QuickHashStringIntHash( 1024 );
var_dump( $hash->add( "forty three", 42 ) );
var_dump( $hash->add( "fifty two", 52 ) );
$hash->saveToFile( '/tmp/test.hash.string' );
?>