note 104878 deleted from internals2.opcodes.instanceof by googleguy
| From: | googleguy@php.net | Date: | Fri, 11 Jan 2013 09:25:16 +0000 |
| Subject: | note 104878 deleted from internals2.opcodes.instanceof by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192906@lists.php.net to get a copy of this message | ||
Note Submitter: Sasanapuri Satish
----
The operator instanceof can also be used to determine whether an object of a class is inheriting
property from another class or not.
Example:
<?php
class test
{ var $var;
function disp()
{
echo "Inside the class";
}
}
$obj=new test;
var_dump($obj instanceof test); // Prints bool(true)
?>