HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

get_declared_traits

Description

The get_declared_traits of Class / Object for PHP returns an array of all declared traits.

Syntax

get_declared_traits ( void ) : array

Return

Returns an array with names of all declared traits in values. Returns NULL in case of a failure.

Examples

1

<?

trait mytrait
{
}

$return = get_declared_traits();

print_r($return);
Array
(
    [0] => mytrait
)