From 04efa58936f837f045db7eb0f6fa5a0a7bfb9537 Mon Sep 17 00:00:00 2001 From: Ron Chmara Date: Fri, 3 Nov 2000 03:49:38 +0000 Subject: [PATCH] Reference returning from a function (fixing example, text) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35194 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/functions.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/language/functions.xml b/language/functions.xml index a5ddb323e9..9690e389b9 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -258,14 +258,14 @@ 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 assigning the return value to a variable: + when assigning the returned value to a variable: function &returns_reference() { - return &$someref; + return $someref; } -$newref = &returns_reference(); +$newref =&returns_reference();