mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
1b382d80a6
commit
c264e11158
1 changed files with 57 additions and 0 deletions
|
@ -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] => 1
|
||||
[E_WARNING] => 2
|
||||
[E_PARSE] => 4
|
||||
[E_NOTICE] => 8
|
||||
[E_CORE_ERROR] => 16
|
||||
[E_CORE_WARNING] => 32
|
||||
[E_COMPILE_ERROR] => 64
|
||||
[E_COMPILE_WARNING] => 128
|
||||
[E_USER_ERROR] => 256
|
||||
[E_USER_WARNING] => 512
|
||||
[E_USER_NOTICE] => 1024
|
||||
[E_ALL] => 2047
|
||||
[TRUE] => 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>
|
||||
|
|
Loading…
Reference in a new issue