K2hIterator::valid
Returns whether the current K2hIterator item is valid
Description
public bool K2hIterator::valid ( void )
Returns whether the current pointer to an element of k2hash keys is valid.
Parameters
This function has no parameters.
Return Values
Returns true if the current pointer to an element of k2hash keys is valid, otherwise false.
Examples
- Example 1 - Returns whether the current pointer to an element of k2hash keys is valid
<?php
$handle = k2hpx_open_mem();
k2hpx_set_value($handle, "test1", "value1");
$k2hiter = new K2hIterator($handle);
var_dump($k2hiter->valid());
unset($k2hiter);
?>
The above example will output:
bool(true)