PHP Constant Arrays
In PHP 5.6, constant arrays could only be defined via const; in PHP 7, they can be defined using define().
Example
<?php
// 使用 define 函数来定义数组
define('sites', [
'Google',
'Example',
'Taobao'
]);
print(sites[1]);
?>
The output of the above program is:
Example
Other Extensions
PHP 7 New Features