Added get_defined_constants() documentation.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@48132 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sean Bright 2001-05-22 01:39:51 +00:00
parent 1b382d80a6
commit c264e11158

View file

@ -1363,6 +1363,63 @@ putenv ("UNIQID=$uniqid");
</refsect1>
</refentry>
<refentry id="function.get-defined-constants">
<refnamediv>
<refname>get_defined_constants</refname>
<refpurpose>
Returns an associative array with the names of all the constants
and their values.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>get_defined_constants</function></funcdef>
<void/>
</funcprototype>
</funcsynopsis>
<para>
This function returns the names and values of all the constants
currently defined. This includes those created by extensions as
well as those created with the <function>define</function>
function.
</para>
<para>
For example the line below
<informalexample>
<programlisting>
print_r (get_defined_constants());
</programlisting>
</informalexample>
will print a list like:
<informalexample>
<programlisting>
Array
(
[E_ERROR] =&gt; 1
[E_WARNING] =&gt; 2
[E_PARSE] =&gt; 4
[E_NOTICE] =&gt; 8
[E_CORE_ERROR] =&gt; 16
[E_CORE_WARNING] =&gt; 32
[E_COMPILE_ERROR] =&gt; 64
[E_COMPILE_WARNING] =&gt; 128
[E_USER_ERROR] =&gt; 256
[E_USER_WARNING] =&gt; 512
[E_USER_NOTICE] =&gt; 1024
[E_ALL] =&gt; 2047
[TRUE] =&gt; 1
)
</programlisting>
</informalexample>
</para>
<para>
See also: <function>get_loaded_extensions</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.get-loaded-extensions">
<refnamediv>
<refname>get_loaded_extensions</refname>