diff --git a/language/constants.xml b/language/constants.xml index 7d68dd2d42..e5bb26d5fe 100644 --- a/language/constants.xml +++ b/language/constants.xml @@ -168,6 +168,16 @@ echo CONSTANT; + + + As opposed to defining constants using define, + constants defined using the const keyword must be + declared at the top-level scope because they are defined at compile-time. + This means that they cannot be declared inside functions, loops or + if statements. + + + See also Class Constants.