get_declared_classes
定義済のクラスの名前を配列として返す
&reftitle.description;
arrayget_declared_classes
定義済のクラスの名前を配列として返します。
&reftitle.parameters;
&no.function.parameters;
&reftitle.returnvalues;
この関数は、現在のスクリプトで宣言されたクラスの名前の配列を返します。
PHP にコンパイル時に組み込んだり読み込んだりしている拡張モジュールの種類に依存して、
他のクラスも存在する可能性があることに注意しましょう。
これは、自作のクラスをそれらと同じ名前で作成できないことを意味します。
定義済みのクラスについては付録の定義済みクラスのセクションを
参照ください。
&reftitle.changelog;
&Version;
&Description;
7.4.0
以前のバージョンでは、get_declared_classes 関数は
子クラスの前に親クラスを常に返していました。
このバージョンからは、そうした動きはなくなりました。
この関数の戻り値について、特定の順序は保証されません。
&reftitle.examples;
get_declared_classes の例
]]>
&example.outputs.similar;
stdClass
[1] => __PHP_Incomplete_Class
[2] => Directory
)
]]>
&reftitle.seealso;
class_exists
get_declared_interfaces
get_defined_functions