ID:               26867
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jaba at inbox dot lv
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: Any
 PHP Version:      5.0.0b3 (beta3)
 New Comment:

Use get_declared_interfaces()



Previous Comments:
------------------------------------------------------------------------

[2004-01-10 19:37:40] jaba at inbox dot lv

I mixed up expected with actual results.

------------------------------------------------------------------------

[2004-01-10 19:36:09] jaba at inbox dot lv

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 this bug report at http://bugs.php.net/?id=26867&edit=1

Reply via email to