[PHP-DOC] cvs: phpdoc /en/functions misc.xml From: Ron Chmara (ron <email protected>)
Date: 11/02/00

ronabop Wed Nov 1 22:38:45 2000 EDT

  Modified files:
    /phpdoc/en/functions misc.xml
  Log:
  Example for defined()
  
Index: phpdoc/en/functions/misc.xml
diff -u phpdoc/en/functions/misc.xml:1.33 phpdoc/en/functions/misc.xml:1.34
--- phpdoc/en/functions/misc.xml:1.33 Fri Sep 15 09:09:43 2000
+++ phpdoc/en/functions/misc.xml Wed Nov 1 22:38:45 2000
@@ -171,6 +171,16 @@
     <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