php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #32135 Add class_hierarchy() function
Submitted: 2005-02-28 18:51 UTC Modified: 2010-12-22 03:31 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: anferr at mecon dot gov dot ar Assigned:
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
 [2005-02-28 18:51 UTC] anferr at mecon dot gov dot ar
Description:
------------
It'll be very useful to add a class_hierarchy() function
Proposed signature:

array class_hierarchy(mixed $object)

$object can be an object, or a string class name.
returns an array with class hierarchy (ordered from obj to first parent, or reverse, but ordered :-) )


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-22 03:31 UTC] johannes@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-22 03:31 UTC] johannes@php.net
it is trivial to create this from reflection. But you have to consider interfaces, too. For adding such a thing to the distribution the use cases are too limited.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 04:01:32 2024 UTC