#34993 [Opn->Csd]: instanceof documentation & inheritance

From: Date: Thu, 03 Nov 2005 10:18:09 +0000
Subject: #34993 [Opn->Csd]: instanceof documentation & inheritance
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969370762@lists.php.net to get a copy of this message
ID: 34993 Updated by: vrana@php.net 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

« previous php.doc (#969370762) next »