(PECL spl_types >= 0.1.0)
SplEnum::getConstList — Returns all consts (possible values) as an array
public SplEnum::getConstList ([ bool $include_default = false ] ) : array
This function is currently not documented; only its argument list is available.
include_default
Whether to include __default
property.
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–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/splenum.getconstlist.php