<?php
trait FooTrait
{
public function foo()
{
return "foo";
}
}
trait BarTrait
{
use FooTrait;
public function bar()
{
return "bar";
}
}
dd((new class {
use BarTrait;
})->foo());
Fatal error: Uncaught Error: Call to undefined function dd() in /in/GYkLa:25
Stack trace:
#0 {main}
thrown in /in/GYkLa on line 25
Process exited with code 255.