This failed:
define('DEFAULT_ROLES', array('guy', 'development team'));
Apparently, constants can't hold arrays. What is the best way to get around this?
define('DEFAULT_ROLES', 'guy|development team');
//...
$default = explode('|', DEFAULT_ROLES);
This seems like unnecessary effort.
This is what I use. It is similar to the example provided by soulmerge, but this way you can get the full array or just a single value in the array.
Use it like this:
That is correct, you cannot use arrays for a constant, only scaler and null. The idea of using an array for constants seem a bit backwards to me.
What I suggest to do instead is define your own constant class and use that to get the constant.