K2hIterator::current K2hIterator Class K2hIterator::next

K2hIterator::key

Gets key of the current K2hIterator item

Description

public stringfalseK2hIterator::key ( void )

Gets the key in an array of k2hash keys.

Parameters

This function has no parameters.

Return Values

Returns the key.

Examples

<?php
$handle = k2hpx_open_mem();
k2hpx_set_value($handle, "test1", "value1");
k2hpx_set_value($handle, "test2", "value2");
$k2hiter = new K2hIterator($handle);
var_dump($k2hiter->key());
unset($k2hiter);
?>

The above example will output:

string(5) "test2"

See Also

K2hIterator::current K2hIterator Class K2hIterator::next