Home > PHP > Function > Classes/Objects > is_a()

is_a()

is_a - Checks if the object is of this class or has this class as one of its parents

Syntax

bool is_a (object $object, string $class_name)

Arguments

  • object - The tested object
  • class_name - The class name

Description

Checks if the given object is of this class or has this class as one of its parents.

Version

PHP 4.2.0, 5

Return value

Returns TRUE if the object is of this class or has this class as one of its parents, FALSE otherwise.