QuickHashStringIntHash::get
PHP function
Edit on GitHub ✎
This method retrieves a value from the hash by its key
Description
QuickHashStringIntHash::get(string $key): mixed
This method retrieves a value from the hash by its key.
Parameters
keyThe key of the entry to retrieve.
Return Values
The value if the key exists, or null if the key wasn't part of the hash.
Examples
QuickHashStringIntHash::get() example
php
<?php
$hash = new QuickHashStringIntHash( 8 );
var_dump( $hash->get( "one" ) );
var_dump( $hash->add( "two", 2 ) );
var_dump( $hash->get( "two" ) );
?>The above example will output something similar to:
output
bool(false)
bool(true)
int(2)