PHP 8.6.0 Beta 3 is available for testing

Yaf_Config_Simple::count

(Yaf >=1.0.0)

Yaf_Config_Simple::countCount configuration entries

Beschreibung

public function Yaf_Config_Simple::count(): int

Returns the number of top-level configuration entries.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

The number of top-level entries as an integer.

Beispiele

Beispiel #1 Yaf_Config_Simple::count() example

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

// Only the top-level entries ("application" and "database") are counted
var_dump(count($config));
var_dump($config->count());
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

int(2)
int(2)

Siehe auch

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top