This PHP extension is enum interface.
% phpize
% ./configure
% make
% make install
enum.ini:
extension=enum.so
bool enum( string $name, mixed $constants )
name:
The interface name
constants:
The constant objects
Returns TRUE if the interface succeeded in creating, FALSE otherwise.
bool enum_vars( mixed $interface )
name:
An object instance or interface name
An array of constants. Constant name in key, constant value in value.
bool enum_exists( string $name )
name:
The constant name
Returns TRUE if the named constant given by name has been defined, FALSE otherwise.
enum('Test', array('a', 'b', 'c'));
echo Test::a;
enum_vars('Test');
enum_exists('Test::b');
class Hoge inplements Test {};