Php/docs/resourcebundle.count

提供:Dev Guides
< Php
移動先:案内検索

ResourceBundle::count

resourcebundle_count

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

ResourceBundle::count -- resourcebundle_countバンドル内の要素数を取得する


説明

オブジェクト指向型

public ResourceBundle::count ( ) : int

手続き型

resourcebundle_count ( ResourceBundle $r ) : int

バンドル内の要素数を取得します。


パラメータ

r
ResourceBundle オブジェクト。


返り値

バンドル内の要素数を返します。


例1 resourcebundle_count() の例

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

例2 オブジェクト指向の例

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

上の例の出力は以下となります。


42

参考