php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43315 Additional Class inspection
Submitted: 2007-11-16 17:30 UTC Modified: 2007-11-16 18:08 UTC
From: artktec at gmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
 [2007-11-16 17:30 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-16 18:08 UTC] johannes@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 19:01:29 2024 UTC