1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 09:42:22 +01:00
Files
archived-php-src/ext/reflection/tests/bug81681.phpt
Christoph M. Becker 59dd4fd742 Fix #81681: ReflectionEnum throwing exceptions
Enums are neither instantiable nor cloneable.

Closes GH-7707.
2021-12-02 23:22:07 +01:00

19 lines
319 B
PHP

--TEST--
Bug #81681 (ReflectionEnum throwing exceptions)
--FILE--
<?php
enum Status
{
case Draft;
case Published;
case Archived;
}
$reflectionEnum = new \ReflectionEnum('\Status');
var_dump($reflectionEnum->isInstantiable());
var_dump($reflectionEnum->isCloneable());
?>
--EXPECT--
bool(false)
bool(false)