Voting

: seven minus four?
(Example: nine)

The Note You're Voting On

@everaldofilho
6 years ago
Example of use:

<?php

namespace Example;

// Declare Trait
trait FooTrait
{
}

// Declare Abstract class
abstract class FooAbstract
{
}

// Declare class
class Bar extends FooAbstract
{
use
FooTrait;
}

// Get all traits declareds
$array = get_declared_traits();

var_dump($array);
/**
* Result:

* array(1) {
* [0] =>
* string(23) "Example\FooTrait"
* }
*/

<< Back to user notes page

To Top