I've noticed many (all?) PHP constants have a single-letter prefix, like E_NOTICE
, T_STRING
, etc. When defining a set of class constants that work in conjunction with one another, do you prefer to follow similar practice, or do you prefer to be more verbose?
class Foo {
// let's say 'I' means "input" or some other relevant word
const I_STRING = 'string';
const I_INTEGER = 'integer';
const I_FLOAT = 'float';
}
or
class Bar {
const INPUT_STRING = 'string';
const INPUT_INTEGER = 'integer';
const INPUT_FLOAT = 'float';
}