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.

Przykład 1. class_parents() example

<?php

class foo { }
class
bar extends foo {}

print_r(class_parents(new bar));

?>

Powyższy przykład wyświetli:

Array
(
    [foo] => foo
)

Hosting by: Hurra Communications Sp. z o.o.
Generated: 2007-01-26 18:02:24