K2hash::dumpFull K2hash Class K2hash::dumpHead

K2hash::dumpFullKeytable

Prints details of the k2hash’s hash tables

Description

 public bool K2hash::dumpFullKeytable ([ mixed $output ] )

Prints details of the k2hash’s hash tables including headers, hash tables and sub-hash tables.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php
K2hash::create("/tmp/test_k2hash.k2h");
$k2hash = new K2hash();
$k2hash->openRO("/tmp/test_k2hash.k2h");
$fp = fopen("/tmp/k2hash_dump_full_keytable.log", 'w');
$k2hash->dumpFullKeytable($fp);
fclose($fp);
$k2hash->close();

$fp = fopen("/tmp/k2hash_dump_full_keytable.log", 'r');
if ($fp) {
        while (!feof($fp)) {
                if (($buf = fgets($fp, 4096)) !== false) {
                        echo $buf;
                }
        }
        fclose($fp);
}
?>

The above example will output:

...
    Key Index Pointer[29] = Not Allocated
    Key Index Pointer[30] = Not Allocated
    Key Index Pointer[31] = Not Allocated
  }

See Also

K2hash::dumpFull K2hash Class K2hash::dumpHead