diff --git a/language/constants.xml b/language/constants.xml index dc7da1bbcb..f622ca90b3 100644 --- a/language/constants.xml +++ b/language/constants.xml @@ -1,5 +1,5 @@ - + Constants @@ -66,10 +66,14 @@ If you use an undefined constant, PHP assumes that you mean - the name of the constant itself. A - notice will be issued - when this happens. Use the defined-function if - you want to know if a constant is set. + the name of the constant itself, just as if you called it as + a string (CONSTANT vs "CONSTANT"). An error of level + E_NOTICE will be issued + when this happens. See also the manual entry on why + $foo[bar] is + wrong (unless you first define + bar as a constant). If you simply want to check if a + constant is set, use the defined function. These are the differences between constants and variables: