instanceof

instanceof is used to determine whether a PHP variable is an instantiated object of a certain class:

<?php
 class A{
 
}
 $obj = new A();

if ($obj instanceof A) {
 echo 'A';
 }
?>