Gender\Gender::country

(PECL gender >= 0.8.0)

Gender\Gender::country — 텍스트 국가 표현 가져오기


설명

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

성별 클래스 상수에서 국가의 텍스트 표현을 반환합니다.


매개변수

country
Gender\Gender 클래스 상수로 지정된 국가 ID입니다.

반환 값

성공하면 국가의 짧은 이름과 전체 이름이 포함된 배열을 반환하고 실패하면 false를 반환합니다.


Examples

예제 #1 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"
}