From a0af9fd50a1136de09e427f00b8404a233da9521 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Tue, 2 Dec 2008 00:21:10 +0000 Subject: [PATCH] Fixed #46348 (constant docs still say you can't define a resource as a constant, but you can) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@270277 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/constants.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/language/constants.xml b/language/constants.xml index 61bc59dc7e..cd24f77bfd 100644 --- a/language/constants.xml +++ b/language/constants.xml @@ -1,5 +1,5 @@ - + Constants @@ -70,8 +70,9 @@ define("__FOO__", "something"); Only scalar data (boolean, integer, float and string) can be contained - in constants. - Do not define resource constants. + in constants. Its possible to register constants as + resource, but it should be avoided, as it can cause + unexpected results. You can get the value of a constant by simply specifying its name.