Example for defined()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35033 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ron Chmara 2000-11-02 06:38:45 +00:00
parent e1737da3ca
commit 1b6f6bd0d7

View file

@ -171,6 +171,16 @@ echo CONSTANT; // outputs "Hello world."
<para>
Returns true if the named constant given by
<parameter>name</parameter> has been defined, false otherwise.
<example>
<title>Checking Constants</title>
<programlisting role="php">
&lt;?php
if (defined("CONSTANT")){ // Note that it should be quoted
echo CONSTANT; //
}
?&gt;
</programlisting>
</example>
</para>
<para>
See also <function>define</function> and the section on <link