QuickHashIntStringHash::set

(PECL quickhash >= Unknown) This method updates an entry in the hash with a new value, or adds a new one if the entry doesn't exist public int QuickHashIntStringHash::set ( int $key, string $value ) This method tries to update an entry with a new value. In case the entry did not yet exist, it will instead add a new entry. It returns whether the entry was added or update. If there are duplicate keys, only the first found e

QuickHashIntStringHash::saveToString

(PECL quickhash >= Unknown) This method returns a serialized version of the hash public string QuickHashIntStringHash::saveToString ( void ) This method returns a serialized version of the hash in the same format that loadFromString() can read. Returns: This method returns a string containing a serialized format of the hash. Each element is stored as a four byte value in the Endianness that the

QuickHashIntStringHash::saveToFile

(PECL quickhash >= Unknown) This method stores an in-memory hash to disk public void QuickHashIntStringHash::saveToFile ( string $filename ) This method stores an existing hash 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.

QuickHashIntStringHash::loadFromString

(PECL quickhash >= Unknown) This factory method creates a hash from a string public static QuickHashIntStringHash QuickHashIntStringHash::loadFromString ( string $contents [, int $size = 0 [, int $options = 0 ]] ) This factory method creates a new hash from a definition in a string. The format is the same as the one used in "loadFromFile". Parameters: contents The st

QuickHashIntStringHash::loadFromFile

(PECL quickhash >= Unknown) This factory method creates a hash from a file public static QuickHashIntStringHash QuickHashIntStringHash::loadFromFile ( string $filename [, int $size = 0 [, int $options = 0 ]] ) This factory method creates a new hash from a definition file on disk. The file format consists of a signature 'QH\0x12\0', the number of elements as a 32 bit signed integer in system Endianness, an unsigned 32 bi

QuickHashIntStringHash::getSize

(PECL quickhash >= Unknown) Returns the number of elements in the hash public int QuickHashIntStringHash::getSize ( void ) Returns the number of elements in the hash. Returns: The number of elements in the hash. Examples: QuickHashIntStringHash::getSize() example <?php $hash = new QuickHashIntStringHash( 8 ); var_du

QuickHashIntStringHash::get

(PECL quickhash >= Unknown) This method retrieves a value from the hash by its key public mixed QuickHashIntStringHash::get ( int $key ) This method retrieves a value from the hash by its key. Parameters: key The key of the entry to add. Returns: The value if the key exists, or NULL if the key wasn't part of the hash.

QuickHashIntStringHash::exists

(PECL quickhash >= Unknown) This method checks whether a key is part of the hash public bool QuickHashIntStringHash::exists ( int $key ) This method checks whether an entry with the provided key exists in the hash. Parameters: key The key of the entry to check for whether it exists in the hash. Returns: Returns TRUE when the entry was found, o

QuickHashIntStringHash::delete

(PECL quickhash >= Unknown) This method deletes am entry from the hash public bool QuickHashIntStringHash::delete ( int $key ) This method deletes an entry from the hash, and returns whether the entry was deleted or not. Associated memory structures will not be freed immediately, but rather when the hash itself is freed. Elements can not be deleted when the hash is used in an iterator. The method will not throw an excep

QuickHashIntStringHash::__construct

(PECL quickhash >= Unknown) Creates a new QuickHashIntStringHash object public QuickHashIntStringHash::__construct ( int $size [, int $options = 0 ] ) This constructor creates a new QuickHashIntStringHash. The size is the amount of bucket lists to create. The more lists there are, the less collisions you will have. Options are also supported. Parameters: size The amou