k2hpx_keyq_handle
Gets the K2hKeyQueue file handle
Description
mixed k2hpx_keyq_handle ( mixed $handle_res [, bool $is_filo [, stringnull $prefix ]] )
Gets the K2hKeyQueue handle.
Parameters
- handle_res
Specifies the k2hash (.k2h
) file handle that k2hpx_open returns. - is_filo
Specifies true if the order of the K2hKeyQueue is FIFO, otherwise false. - prefix
Specifies the prefix of the K2hKeyQueue.
Return Values
Returns the K2hKeyQueue file handle.
Examples
- Example 1 - Gets the K2hKeyQueue file handle
<?php
$handle = k2hpx_open_mem();
$keyqhandle = k2hpx_keyq_handle($handle, true, "test_queue_");
var_dump($keyqhandle);
k2hpx_keyq_free($keyqhandle);
k2hpx_close($handle);
?>
The above example will output:
resource(5) of type (k2hkeyqhandle)
See Also
- K2hQueue::__construct - Creates a K2hQueue instance