wrong behaviour with is_subclass_of() ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why does the following code

<?php
interface I {
public function a();
}
class A implements I {
public function a() {}
}
class B extends A {
}
if (is_subclass_of('A', 'I')) echo "A implements I\n";
if (is_subclass_of('B', 'I')) echo "B implements I\n";
?>

outputs:
B implements I

I would expect the following output:
A implements I
B implements I

Johannes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux