php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42360 add paramets for get_declared_classes() - filter by parent class/interface
Submitted: 2007-08-21 13:13 UTC Modified: 2016-12-31 00:14 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: max at redline-software dot com Assigned:
Status: Open Package: Class/Object related
PHP Version: 5.2.3 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: max at redline-software dot com
New email:
PHP Version: OS:

 

 [2007-08-21 13:13 UTC] max at redline-software dot com
Description:
------------
The goal is to return all declared subclasses of given class_name/interface


Reproduce code:
---------------
interface A {}
class A1 implements A {}
class A2 implements A {}
class B extends A1 {}
class C {}

print_r(get_declared_classes('A'));
print_r(get_declared_classes('A1'));

Expected result:
----------------
// print_r(get_declared_classes('A'));
Array
(
    [0] => A1
    [1] => A2
    [2] => B
)

// print_r(get_declared_classes('A1'));
Array
(
    [2] => B
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:14 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Class/Object related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 02:01:25 2019 UTC