Gender\Gender::country

(PECL gender >= 0.8.0)

Gender\Gender::countryGet textual country representation

说明

public Gender\Gender::country ( int $country ) : array

Returns the textual representation of a country from a Gender class constant.

参数

country

A country ID specified by a Gender\Gender class constant.

返回值

Returns an array with the short and full names of the country on success 或者在失败时返回 FALSE.

范例

Example #1 Using Gender\Gender::country()

$gender = new Gender\Gender;
var_dump($gender->country(Gender\Gender::BRITAIN));

以上例程会输出:

array(2) {
  'country_short' =>
  string(2) "UK"
  'country' =>
  string(13) "Great Britain"
}

相关文章
php cachingiterator return the string representation of the current elementphp priorityqueue returns a representation that can be converted to jsonphp stack returns a representation that can be converted to jsonphp mcve 函数 get a textual representation of why a connection failedphp 函数 returns the relaxed extended json representation of a bson valuephp gender gender get textual country representationphp ktaglib id3v2 frame returns a string representation of the framephp intlchar get character representation for a given digit and radixphp mongocollection string representation of this collectionphp mongodb bson binary returns a representation that can be converted to jsonphp mongodb bson decimal128interface returns the string representation of this decimal128interfacephp mongodb bson int64 returns a representation that can be converted to jsonphp mongodb bson maxkey returns a representation that can be converted to jsonphp mongodb bson objectidinterface returns the hexidecimal representation of this objectidinterfacephp mongodb bson regex returns a representation that can be converted to jsonphp mongodb bson timestamp returns a representation that can be converted to jsonphp mongodb bson utcdatetime returns a representation that can be converted to jsonphp mongodb bson utcdatetime returns the datetime representation of this utcdatetimephp solrinputdocument returns an array representation of the input documentphp splobjectstorage unserializes a storage from its string representation
关注编程学问公众号