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:3
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 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 13:01:30 2025 UTC