2024年5月6日发(作者:)
echo "a" <=> "b"; // -1
echo "b" <=> "a"; // 1
通过 define() 定义常量数组 (PHP 7)
Array 类型的常量现在可以通过 define() 来定义。在 PHP5.6 中仅能通过 const 定义。
define('ANIMALS', [
'dog',
'cat',
'bird'
]);
echo ANIMALS[1]; // outputs "cat"
php7函数,声明,返回值等新特性介绍
Processing math: 100%
发布评论