php8.5
Home/ Manual/ quickhash / quickhashintstringhash/ QuickHashIntStringHash::getSize

QuickHashIntStringHash::getSize

PHP function Edit on GitHub ✎

(PECL quickhash >= Unknown)

Returns the number of elements in the hash

Description

QuickHashIntStringHash::getSize(): int

Returns the number of elements in the hash.

Parameters Parameters

Return Values

The number of elements in the hash.

Examples

QuickHashIntStringHash::getSize() example

php
<?php
$hash = new QuickHashIntStringHash( 8 );
var_dump( $hash->add( 2, "two" ) );
var_dump( $hash->add( 3, 5 ) );
var_dump( $hash->getSize() );
?>

The above example will output something similar to:

output
bool(true)
bool(true)
int(2)

Source: reference/quickhash/quickhashintstringhash/getsize.xml · from the official PHP manual (php/doc-en)