PHP 手冊
前一頁 |  | 下一頁

# class_parents

(PHP 5)

class_parents -- Return the parent classes of the given class

## Description

array class_parents ( object class )

This function returns an array with the name of the parent classes of the given class.

範例 1. class_parents() example

`<?php class foo { } class bar extends foo {} print_r(class_parents(new bar)); ?>`

The above example will output:

    Array
    (
        [foo] => foo
    )

前一頁 | 內容 | 下一頁
class_implements | 上一層 | iterator_count