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
1
2
3
4
5
6
7
8
9
<?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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.