[doc-en] master: get_defined_constants - warning about magic constants (#3109)
| From: | Jorg Adam Sowa via GitHub | Date: | Tue, 08 Sep 2026 09:32:37 +0000 |
| Subject: | [doc-en] master: get_defined_constants - warning about magic constants (#3109) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23727@lists.php.net to get a copy of this message | ||
Author: Jorg Adam Sowa (jorgsowa)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-09-08T11:32:34+02:00
Commit: https://github.com/php/doc-en/commit/df4b2be84a0ca22f837f2a921bc40b178be45c66
Raw diff: https://github.com/php/doc-en/commit/df4b2be84a0ca22f837f2a921bc40b178be45c66.diff
get_defined_constants - warning about magic constants (#3109)
* get_defined_constants - warning about magic constants
* docs: clarify that get_defined_constants() excludes magic constants
* fix: use simpara instead of para in description
---------
Co-authored-by: lacatoire <la.catoire@gmail.com>
Changed paths:
M reference/info/functions/get-defined-constants.xml
Diff:
diff --git a/reference/info/functions/get-defined-constants.xml
b/reference/info/functions/get-defined-constants.xml
index 0a01c80d565d..492fa859f6fb 100644
--- a/reference/info/functions/get-defined-constants.xml
+++ b/reference/info/functions/get-defined-constants.xml
@@ -12,11 +12,12 @@
<type>array</type><methodname>get_defined_constants</methodname>
<methodparam
choice="opt"><type>bool</type><parameter>categorize</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
- <para>
- 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>
+ <simpara>
+ Returns the names and values of all currently defined constants. This includes constants
+ defined by extensions and those created using the <function>define</function>
function.
+ However, it excludes <link linkend="language.constants.magic">magic
constants</link>,
+ which resolve at compile time.
+ </simpara>
</refsect1>
<refsect1 role="parameters">