K2hIterator::next K2hIterator Class K2hIterator::valid

K2hIterator::rewind

Rewinds the internal array pointer of k2hash keys

Description

 public void K2hIterator::rewind ( void )

Rewinds the internal array pointer of k2hash keys.

Parameters

This function has no parameters.

Return Values

No value is returned.

Examples

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

The above example will output:

string(5) "test1"

See Also

K2hIterator::next K2hIterator Class K2hIterator::valid