3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum Status: int { case Open = 1; case Close = 2; case Invalid = 3; const Values = [ self::Open->value => self::Open, self::Close->value => self::Close, self::Invalid->value => self::Invalid, ]; } class Foo { const BAR = Status::Values; } var_dump(Foo::BAR);

preferences:
22.73 ms | 404 KiB | 5 Q