diff --git a/language/functions.xml b/language/functions.xml index 4c7d948135..930348bd01 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -255,6 +255,20 @@ list ($zero, $one, $two) = small_numbers(); + + To return a reference from a function, you have to use + the reference operator & in both the function declaration and + when asigning the return value to a variable: + + +function &returns_reference() { + return &$someref; +} + +$newref = &returns_reference(); + + +