- Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.24, 8.3.0 - 8.3.12
- Fatal error: Uncaught Error: Undefined constant "self" in /in/uHXGW:7
Stack trace:
#0 /in/uHXGW(18): Titular::int()
#1 {main}
thrown in /in/uHXGW on line 7
Process exited with code 255.
<?php
trait Accessor
{
public static function int():int
{
var_dump(new ReflectionEnum(self));
}
}
enum Titular: int
{
use Accessor;
case minimus=1;
case maximus=2;
}
echo Titular::minimus::int();