|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-10 19:37 UTC] jaba at inbox dot lv
[2004-01-11 10:22 UTC] sniper@php.net
[2004-01-11 10:57 UTC] jaba at inbox dot lv
[2005-05-02 11:30 UTC] andrey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 07:00:01 2025 UTC |
Description: ------------ At PHP5 we have a nice thing called interface. get_declared_classes() returns an array of all - abstract and non-abstract classes, but the array does not contain my interfaces. If interface is loaded by __autoload just like classes, shouldn't it be loaded into classes register too? Is there any way to check is it interface or what? Reproduce code: --------------- <?php interface Dao { function Open(); function Close(); } echo "<p>class_exists('Dao') says that Dao "; echo ( class_exists('Dao') ? 'is defined' : 'is not defined' ); $classes = get_declared_classes(); echo "<p>get_declared_classes() says that Dao "; echo ( in_array('Dao',$classes) ? 'is defined' : 'is not defined' ); ?> Expected result: ---------------- class_exists('Dao') says that Dao is defined get_declared_classes() says that Dao is not defined Actual result: -------------- class_exists('Dao') says that Dao is defined get_declared_classes() says that Dao is defined