K2hdkc::getAttrs
Gets attribute information of the key
Description
public function getAttrs(
string $key): array|null {}
Gets attribute information of the key.
Parameters
- key
Specify the key to get attribute information
Return Values
Returns arrays on success or null
on failure.
Examples
- Example 1 - Gets attribute information of the key
php -r '
$handle = new K2hdkc("./tests/slave.ini");
$handle->setValue("key1", "val1");
var_dump($handle->getAttrs("key1"));
'
The above example will output:
array(1) {
[0]=>
string(5) "mtime"
}
See Also
- K2hdkc::setValue - Sets a pair of the key/value