Alex Rešatniak
Alex Rešatniak

Reputation: 453

How can I check class (not object) inheritance?

For example:

class A {}

class B extends A {}

Are there any function like is_a('B', 'A') to check not object, but class inheritance?
Thanks.

Upvotes: 1

Views: 61

Answers (1)

Vincent Beltman
Vincent Beltman

Reputation: 2112

Yes there is. You were almost right: Here is the link:

http://php.net/manual/en/function.is-a.php

Upvotes: 4

Related Questions