From: jaba at inbox dot lv Operating system: Any PHP version: 5.0.0b3 (beta3) PHP Bug Type: Class/Object related Bug description: get_declared_classes() does not return interfaces
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 -- Edit bug report at http://bugs.php.net/?id=26867&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26867&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26867&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26867&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26867&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26867&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26867&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26867&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26867&r=support Expected behavior: http://bugs.php.net/fix.php?id=26867&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26867&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26867&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26867&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26867&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26867&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26867&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26867&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26867&r=float