PHP instanceof May 8, 2018 Pramod T P Leave a comment 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'; } ?>