|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2012-06-17 16:22 UTC] valentiny510 at yahoo dot es
 Description:
------------
Maybe the name of the function get_"declared"_classes is to obvious..
to show only the "declared" classes and not the referenced one but if it true
do not duplicate them, or show the name of the alias
Test script:
---------------
class a { }
class_alias(a, b);
print_r(get_declared_classes( ));
Expected result:
----------------
Array
(
    [0] => a
    [1] => b
)
Actual result:
--------------
Array
(
    [0] => a
    [1] => a
)
Patchesbug62343.phpt (last revision 2012-06-22 09:29 UTC by laruence@php.net)bug62343.patch (last revision 2012-06-22 09:28 UTC by laruence@php.net) Pull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 17:00:02 2025 UTC | 
Aliases are not declared classes but ... aliases :) I don't think it should be shown through that. However, using an optional argument, it could then return: Array ( ['a'] => NULL ['b'] => 'a' ) for example.