略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SplEnum::getConstList

2024-05-18

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)
}
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/splenum.getconstlist.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3