Array constant only allowed in 7+

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343088 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Remi Collet 2017-09-14 10:38:27 +00:00
parent 542b9b6ae3
commit b0329daf2d

View file

@ -75,7 +75,7 @@ define("__FOO__", "something");
only scalar data (<type>boolean</type>, <type>integer</type>,
<type>float</type> and <type>string</type>) can be contained
in constants prior to PHP 5.6. From PHP 5.6 onwards, it is possible to
define a constant as a scalar expression, and it is also possible
define a constant as a scalar expression, and from PHP 7 it is also possible
to define an <type>array</type> constant. It is possible to define
constants as a <type>resource</type>, but it should be avoided, as it can
cause unexpected results.