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
This commit is contained in:
Kalle Sommer Nielsen 2008-12-02 00:21:10 +00:00
parent 38ea7914b1
commit a0af9fd50a

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.53 $ -->
<!-- $Revision: 1.54 $ -->
<chapter xml:id="language.constants" xmlns="http://docbook.org/ns/docbook">
<title>Constants</title>
@ -70,8 +70,9 @@ define("__FOO__", "something");
<simpara>
Only scalar data (<type>boolean</type>, <type>integer</type>,
<type>float</type> and <type>string</type>) can be contained
in constants.
Do not define <type>resource</type> constants.
in constants. Its possible to register constants as
<type>resource</type>, but it should be avoided, as it can cause
unexpected results.
</simpara>
<simpara>
You can get the value of a constant by simply specifying its name.