SplEnum::getConstList

(PECL spl_types >= 0.1.0)

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

说锟斤拷

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

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)
}