|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-03 11:18 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 10:00:01 2025 UTC |
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 ?>