diff --git a/language/variables.xml b/language/variables.xml index 7edff3923b..bf0b1f5dc0 100644 --- a/language/variables.xml +++ b/language/variables.xml @@ -1,5 +1,5 @@ - + Variables @@ -459,6 +459,54 @@ function Test() + + Static initializers are evaluated when a function is defined, not + when it is executed. Thus you cannot make reference to any other + variables or initialize a static variable with the result of a + function call. The following example suggests a way around this: + + + + + + + + + + If the function you are calling has predictable return values, for + example, if it can never return null, this + can be further simplified (note the use of the identity operator + ===): + + + + + + + + The Zend Engine 1, driving PHP4, implements the static and global modifier for