Examveda
Examveda

Which version of PHP introduced the instanceof keyword?

A. PHP 4

B. PHP 5

C. PHP 5.3

D. PHP 6

Answer: Option B

Solution(By Examveda Team)

Using instanceof keyword we can determine whether an object is an instance of a class. $manager = new Employee() … if ($manager instanceof Employee) echo “True”;

This Question Belongs to PHP >> Object Oriented Concept

Join The Discussion

Related Questions on Object Oriented Concept