Dutch PHP Conference 2025 - Call For Papers

ResourceBundle::count

resourcebundle_count

(PHP 5 >= 5.3.2, PHP 7, PHP 8, PECL intl >= 2.0.0)

ResourceBundle::count -- resourcebundle_countGet number of elements in the bundle

Опис

Об'єктно-орієнтований стиль

public ResourceBundle::count(): int

Процедурний стиль

resourcebundle_count(ResourceBundle $bundle): int

Get the number of elements in the bundle.

Параметри

bundle

ResourceBundle object.

Значення, що повертаються

Returns number of elements in the bundle.

Приклади

Приклад #1 resourcebundle_count() example

<?php
$r
= resourcebundle_create( 'es', "/usr/share/data/myapp");
echo
resourcebundle_count($r);
?>

Приклад #2 OO example

<?php
$r
= new ResourceBundle( 'es', "/usr/share/data/myapp");
echo
$r->count();
?>

Поданий вище приклад виведе:

42

Прогляньте також

add a note

User Contributed Notes

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