K2hash::dumpFullKeytable K2hash Class K2hash::dumpKeytable

K2hash::dumpHead

Prints the k2hash’s headers

Description

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

Prints the k2hash’s headers.

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_head.log", 'w');
$k2hash->dumpHead($fp);
fclose($fp);
$k2hash->close();

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

The above example will output:

...
  Last area update {
    Date                    = Fri Jan  7 06:25:32 2022
    sec                     = 1641536732
    usec                    = 787684
  }

See Also

K2hash::dumpFullKeytable K2hash Class K2hash::dumpKeytable