K2hIterator Class K2hIterator::current

K2hIterator::__construct

Creates a K2hIterator instance

Description

public K2hIterator::__construct ( mixed $handle_res [, string $key ] )

Creates a K2hIterator instance. K2hIterator represents a pointer of an array of k2hash keys.

Parameters

Examples

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

k2hpx_set_value($handle, "test1", "value1", "sub");
$k2hiter = new K2hIterator($handle, "test1");
var_dump($k2hiter->key());
unset($k2hiter);
?>

The above example will output:

string(5) "test1"
string(3) "sub"

See Also

K2hIterator Class K2hIterator::current