SplEnum::getConstList

(PECL spl_types >= 0.1.0)

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

Description

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

Warning

This function is currently not documented; only its argument list is available.

Parameters

include_default

Whether to include __default property.

Return Values

Examples

Example #1 SplEnum::getConstList() example

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

The above example will output:

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
8 years ago
Why this method is not static???
To Top