<?php
$yac = new Yac();
$yac->set("foo", "bar");
$yac->set("baz", "qux");
print_r($yac->dump());
?>
The above example will output
something similar to:
Array
(
[0] => Array
(
[index] => 12345
[hash] => 14463105906481965911
[crc] => 0
[ttl] => 0
[k_len] => 3
[v_len] => 3
[size] => 0
[atime] => 1725955200
[hits] => 0
[embedded] => 1
[key] => foo
)
[1] => Array
(
[index] => 12987
[hash] => 15132029420525657053
[crc] => 0
[ttl] => 0
[k_len] => 3
[v_len] => 3
[size] => 0
[atime] => 1725955200
[hits] => 0
[embedded] => 1
[key] => baz
)
)
Entries are listed in slot order, not in the order they were stored.
Embedded entries (short scalars kept inside the slot itself) have
crc and size set to zero; entries
stored in a separate value block carry their checksum and block size,
and compressed entries additionally carry c_len.