note 104878 added to internals2.opcodes.instanceof
| From: | SasanapuriSatish at osu1 dot php dot net | Date: | Wed, 13 Jul 2011 08:46:46 +0000 |
| Subject: | note 104878 added to internals2.opcodes.instanceof | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181454@lists.php.net to get a copy of this message | ||
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)
?>
----
Server IP: 69.147.83.197
Probable Submitter: 196.12.58.69
----
Manual Page -- http://www.php.net/manual/en/internals2.opcodes.instanceof.php
Edit -- https://master.php.net/note/edit/104878
Del: integrated -- https://master.php.net/note/delete/104878/integrated
Del: useless -- https://master.php.net/note/delete/104878/useless
Del: bad code -- https://master.php.net/note/delete/104878/bad+code
Del: spam -- https://master.php.net/note/delete/104878/spam
Del: non-english -- https://master.php.net/note/delete/104878/non-english
Del: in docs -- https://master.php.net/note/delete/104878/in+docs
Del: other reasons-- https://master.php.net/note/delete/104878
Reject -- https://master.php.net/note/reject/104878
Search -- https://master.php.net/manage/user-notes.php