QuickHashIntHash::get

(PECL quickhash >= Unknown)

QuickHashIntHash::getThis method retrieves a value from the hash by its key

说明

public QuickHashIntHash::get ( int $key ) : int

This method retrieves a value from the hash by its key.

参数

key

The key of the entry to add.

返回值

The value if the key exists, or NULL if the key wasn't part of the hash.

范例

Example #1 QuickHashIntHash::get() example

<?php
$hash 
= new QuickHashIntHash);
var_dump$hash->get) );

var_dump$hash->add) );
var_dump$hash->get) );

var_dump$hash->add3) );
var_dump$hash->get) );
?>

以上例程的输出类似于:

bool(false)
bool(true)
int(1)
bool(true)
int(5)

相关文章
php yp/nis 函数 returns the first key value pair from the named mapphp quickhashinthash this method deletes am entry from the hashphp quickhashinthash this method checks whether a key is part of the hashphp quickhashinthash this method retrieves a value from the hash by its keyphp quickhashinthash this factory method creates a hash from a filephp quickhashinthash this factory method creates a hash from a stringphp quickhashinthash this method stores an in memory hash to diskphp quickhashinthash this method returns a serialized version of the hashphp quickhashinthash this method updates an entry in the hash with a new value or adds a new one if the entry doesn t existphp quickhashinthash this method updates an entry in the hash with a new valuephp quickhashintstringhash this method deletes am entry from the hashphp quickhashintstringhash this method checks whether a key is part of the hashphp quickhashintstringhash this method retrieves a value from the hash by its keyphp quickhashintstringhash this factory method creates a hash from a filephp quickhashstringinthash this method deletes am entry from the hashphp quickhashstringinthash this method checks whether a key is part of the hashphp quickhashstringinthash this method retrieves a value from the hash by its keyphp quickhashstringinthash this factory method creates a hash from a filephp quickhashstringinthash this factory method creates a hash from a stringphp quickhashstringinthash this method updates an entry in the hash with a new value or adds a new one if the entry doesn t exist
关注编程学问公众号