php8.5
Home/ Manual/ quickhash / quickhashstringinthash/ QuickHashStringIntHash::getSize

QuickHashStringIntHash::getSize

PHP function Edit on GitHub ✎

Returns the number of elements in the hash

Description

QuickHashStringIntHash::getSize(): int

Returns the number of elements in the hash.

Parameters Parameters

Return Values

The number of elements in the hash.

Examples

QuickHashStringIntHash::getSize() example

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

The above example will output something similar to:

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

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