is_a()

is_a() is a PHP native function, that checks if an object is of a specific class.

Usually, is_a() is replaced by instanceof, which is a PHP operator. The function might be needed to create a closure, though.

<?php

    $object = (object) ['a' => 1];

    var_dump(is_a($object, stdClass::class));

?>

Documentation

Related : instanceof, Type Checking, Object, Polymorphism, Class, is_object()