Starting with PHP 5.6, you can define constant arrays using const
keyword like below
const DEFAULT_ROLES = ['test', 'development', 'team'];
and different elements can be accessed as below:
echo DEFAULT_ROLES[1];
....
Starting with PHP 7, constant arrays can be defined using define
as below:
define('DEFAULT_ROLES', [
'test',
'development',
'team'
]);
and different elements can be accessed same way as before.