QuickHashIntSet::saveToFile

(PECL quickhash >= Unknown)
This method stores an in-memory set to disk
public void QuickHashIntSet::saveToFile ( string $filename )

This method stores an existing set to a file on disk, in the same format that loadFromFile() can read.

Parameters:
filename

The filename of the file to store the hash in.

Returns:

No value is returned.

Examples:
QuickHashIntSet::saveToFile() example
<?php
$set = new QuickHashIntSet( 1024 );
var_dump( $set->exists( 4 ) );
var_dump( $set->add( 4 ) );
var_dump( $set->exists( 4 ) );
var_dump( $set->add( 4 ) );

$set->saveToFile( '/tmp/test.set' );
?>

doc_php
2016-02-24 16:13:09
Comments
Leave a Comment

Please login to continue.