PHP 8.6.0 Beta 3 is available for testing

Yaf_Config_Ini::count

(Yaf >=1.0.0)

Yaf_Config_Ini::countCount configuration entries

Açıklama

public function Yaf_Config_Ini::count(): int

Returns the number of top-level configuration entries.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

The number of top-level entries as an integer.

Örnekler

Örnek 1 Yaf_Config_Ini::count() example

<?php
/**
 * Assume /etc/myapp/application.ini contains:
 * [common]
 * application.name = "MyApp"
 * database.host    = "localhost"
 * database.port    = 3306
 */
$config = new Yaf_Config_Ini('/etc/myapp/application.ini', 'common');

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

Yukarıdaki örnek şuna benzer bir çıktı üretir:

int(2)
int(2)

Ayrıca Bakınız

add a note

User Contributed Notes

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