PHP Velho Oeste 2024

SplEnum::getConstList

(PECL spl_types >= 0.1.0)

SplEnum::getConstListReturns all consts (possible values) as an array.

설명

public array SplEnum::getConstList ([ bool $include_default = false ] )

Warning

이 함수는 현재 문서화 되어있지 않습니다; 인수 목록만을 제공합니다.

인수

include_default

Whether to include __default property.

반환값

예제

Example #1 SplEnum::getConstList() example

<?php
$bool 
= new SplBool;
var_dump($bool->getConstList(true));
?>

위 예제의 출력:

array(3) {
  ["__default"]=>
  bool(false)
  ["false"]=>
  bool(false)
  ["true"]=>
  bool(true)
}

add a note add a note

User Contributed Notes 1 note

up
0
samizdam
7 years ago
Why this method is not static???
To Top