ID: 34993
Updated by: [EMAIL PROTECTED]
Reported By: graced at monroe dot wednet dot edu
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
"instanceof is used to determine whether a given object, his parents or
their implemented interfaces are of a specified object class."
Previous Comments:
------------------------------------------------------------------------
[2005-10-26 18:37:33] graced at monroe dot wednet dot edu
Description:
------------
The documentation for the instanceof operator in the manual does not
authoritatively say that the operator checks parent classes and
interfaces as well as the base clase, i.e.
class A { }
class B extends A { }
$thing = new B;
if ($thing instanceof A) {
echo 'A';
}
if ($thing instanceof B) {
echo 'B';
}
// result: AB
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34993&edit=1