<?php
trait ClosureInATrait
{
public static function getClosureInTrait()
{
return __CLASS__;
}
}
class ClassConstantTest
{
use ClosureInATrait;
}
var_dump(ClassConstantTest::getClosureInClass());
Fatal error: Uncaught Error: Call to undefined method ClassConstantTest::getClosureInClass() in /in/KLg4G:15
Stack trace:
#0 {main}
thrown in /in/KLg4G on line 15
Process exited with code 255.