SplEnum::getConstList

SplEnum::getConstList

(PECL spl_types >= 0.1.0)

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

Description

public array SplEnum::getConstList ([ bool $include_default = false ] )
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)
}

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/splenum.getconstlist.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部