Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Config_Simple::__issetYaf_Config_Simple::next>
^Yaf_Config_SimpleLast updated: Mon, 26 Oct 2026

Yaf_Config_Simple::key

(Yaf >=1.0.0)

Yaf_Config_Simple::key — Get current entry key

Description

public function Yaf_Config_Simple::key(): mixed

Returns the key of the current configuration entry during iteration.

Parameters

This function has no parameters.

Return Values

The key of the current entry (string or integer), or false if the position is invalid.

Examples

Example #1 Yaf_Config_Simple::key() example

<?php
$config = new Yaf_Config_Simple([
    'application' => ['name' => 'MyApp'],
    'database'    => ['host' => 'localhost'],
]);

for ($config->rewind(); $config->valid(); $config->next()) {
    echo $config->key(), "\n";
}
?>

The above example will output something similar to:

application
database

See Also


<Yaf_Config_Simple::__issetYaf_Config_Simple::next>
^Yaf_Config_SimpleLast updated: Mon, 26 Oct 2026