PHP 7 新特性
在 PHP 5.6 中仅能通过 const 定义常量数组,PHP 7 可以通过 define() 来定义。
<?php // 使用 define 函数来定义数组 define('sites', [ 'Google', 'facesoho', 'Taobao' ]); print(sites[1]); ?>
以上程序执行输出结果为:
facesoho
英文标题不为空时 视为本栏投稿
需要关键字 描述 英文标题
尊贵的董事大人
英文标题不为空时 视为本栏投稿
需要关键字 描述 英文标题