|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2021-12-01 10:52 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2021-12-01 10:52 UTC] cmb@php.net
[2021-12-02 18:07 UTC] cmb@php.net
[2021-12-02 22:23 UTC] git@php.net
[2021-12-02 22:23 UTC] git@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ ReflectionEnum::isInstantiable returns true (should return false) ReflectionEnum::isCloneable throws exception (should return false) Probably other issues, but ran into these first, which are obviously wrong. All methods in ReflectionEnum inherited from ReflectionClass should return reasonable values for an enum. Test script: --------------- Status.php: enum Status { case Draft; case Published; case Archived; } Test script: include 'yourautoloader.php'; $reflectionClass = new \ReflectionEnum('\Status'); echo $reflectionClass->isInstantiable(); echo "\n"; echo $reflectionClass->isCloneable(); Expected result: ---------------- 0 0 Actual result: -------------- 1 Fatal error: Uncaught Error: Cannot instantiate enum Status ....