note 57501 added to function.is-a
| From: | cesoid at yahoo dot com | Date: | Thu, 06 Oct 2005 02:01:04 +0000 |
| Subject: | note 57501 added to function.is-a | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96465@lists.php.net to get a copy of this message | ||
is_a returns TRUE for instances of children of the class.
For example:
class Animal
{}
class Dog extends Animal
{}
$test = new Dog();
In this example is_a($test, "Animal") would evaluate to TRUE as well as is_a($test,
"Dog").
This seemed intuitive to me, but did not seem to be documented.
----
Manual Page -- http://www.php.net/manual/en/function.is-a.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57501
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57501&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57501&report=yes
Search -- http://master.php.net/manage/user-notes.php