diff --git a/language/functions.xml b/language/functions.xml index 930348bd01..7002b99746 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -258,7 +258,7 @@ 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: + when assigning the return value to a variable: function &returns_reference() { @@ -272,34 +272,8 @@ $newref = &returns_reference(); - - <literal>old_function</literal> - - - The old_function statement allows you to - declare a function using a syntax identical to PHP/FI2 (except you - must replace 'function' with 'old_function'. - - - This is a deprecated feature, and should only be used by the - PHP/FI2->PHP3 convertor. - - - - Functions declared as old_function cannot be - called from PHP's internal code. Among other things, this means - you can't use them in functions such as - usort, array_walk, and - register_shutdown_function. You can get - around this limitation by writing a wrapper function (in normal - PHP3 form) to call the old_function. - - - - - - Variable functions + Function variables PHP supports the concept of variable functions. This means that if @@ -333,6 +307,32 @@ $func( 'test' ); + + <literal>old_function</literal> + + + The old_function statement allows you to + declare a function using a syntax identical to PHP/FI2 (except you + must replace 'function' with 'old_function'. + + + This is a deprecated feature, and should only be used by the + PHP/FI2->PHP3 convertor. + + + + Functions declared as old_function cannot be + called from PHP's internal code. Among other things, this means + you can't use them in functions such as + usort, array_walk, and + register_shutdown_function. You can get + around this limitation by writing a wrapper function (in normal + PHP3 form) to call the old_function. + + + + +