[php-src] Issue #7888: ReflectionEnum::isInstantiable() returns true

From: Date: Wed, 05 Jan 2022 20:22:17 +0000
Subject: [php-src] Issue #7888: ReflectionEnum::isInstantiable() returns true
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238780@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7888 Author: Crell ### Description The following code: ```php <?php enum A { case B; } $e = new ReflectionEnum(A::class); var_dump($e->isInstantiable()); ``` Resulted in this output: ``` bool(true) ``` But I expected this output instead: ``` bool(false) ``` Enums (as of 8.1) are never instantiable, so isInstantiable() should always return false. ### PHP Version 8.1.1 ### Operating System _No response_

« previous php.bugs (#238780) next »