Req #48842 [Fbk->NoF]: Add class_is_instantiable/class_is_abstract functions
| From: | php-bugs at lists dot php dot net | Date: | Sun, 24 Jun 2018 04:22:27 +0000 |
| Subject: | Req #48842 [Fbk->NoF]: Add class_is_instantiable/class_is_abstract functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215894@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48842&edit=1
ID: 48842
Updated by: php-bugs@lists.php.net
Reported by: eitan at mosenkis dot net
Summary: Add class_is_instantiable/class_is_abstract functions
-Status: Feedback
+Status: No Feedback
Type: Feature/Change Request
Package: Class/Object related
PHP Version: 5.2.10
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2018-03-09 12:01:03] cmb@php.net
What's wrong with
(new ReflectionClass($classname))->isAbstract()
------------------------------------------------------------------------
[2009-07-07 22:33:32] eitan at mosenkis dot net
Description:
------------
It would be rather useful to have functions to check if a class is abstract/instantiable, given that
the only way right now is through ReflectionClass since just trying to instantiate it causes a fatal
error which can't be caught. The usage case is when you use get_declared_classes() to iterate
through all available classes and want to instantiate some or all of them, but want to avoid those
that will kill your script when you try.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=48842&edit=1