Name

class_parents

Synopsis

array class_parents(mixed class[, bool autoload_class])

If class is an object, returns an array containing the names of the parents of class’s object class. If class is a string, returns an array containing the class names of the parents of the class named class. Returns false if class is neither an object nor a string, or if class is a string but no object class of that name exists. If autoload_class is set and is true, the class is loaded through the class’s __autoload() function before getting its parents.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.