mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
e1737da3ca
commit
1b6f6bd0d7
1 changed files with 10 additions and 0 deletions
|
@ -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">
|
||||
<?php
|
||||
if (defined("CONSTANT")){ // Note that it should be quoted
|
||||
echo CONSTANT; //
|
||||
}
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>define</function> and the section on <link
|
||||
|
|
Loading…
Reference in a new issue