#43315 [Opn->Bgs]: Additional Class inspection
| From: | johannes@php.net | Date: | Fri, 16 Nov 2007 18:08:25 +0000 |
| Subject: | #43315 [Opn->Bgs]: Additional Class inspection | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119748@lists.php.net to get a copy of this message | ||
ID: 43315
Updated by: johannes@php.net
Reported By: artktec at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 5.2.5
New Comment:
These functions are mainly legacy stuff from the time before we had
reflection, nowadays we try to have a better structure, this means that
reflection is the place for such stuff.
Previous Comments:
------------------------------------------------------------------------
[2007-11-16 17:30:17] artktec at gmail dot com
Description:
------------
There are four native php-functions for inspection of class/object
methods and variables. Those are:
get_class_vars()
get_class_methods()
get_object_vars()
get_object_methods()
I think you could round out this inspection by having native-functions
for getting class/object constants. Thus, I propose:
get_class_constants($class_name)
get_object_constants($object)
I understand that you can use reflection, but I still think it would be
a nice addition to round out the functions. It would also lead to
logical programming techniques.
Nick
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43315&edit=1