From 1901c7be3f3953678bae879906709be6bf46010a Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Sat, 22 Aug 2009 08:00:59 +0000 Subject: [PATCH] Documented new behaviour in 5.3 when called from outtermost scope in a file included from within a function. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@287566 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/funchand/functions/func-get-arg.xml | 53 ++++++++++++++++++ .../funchand/functions/func-get-args.xml | 56 +++++++++++++++++++ .../funchand/functions/func-num-args.xml | 53 ++++++++++++++++++ 3 files changed, 162 insertions(+) diff --git a/reference/funchand/functions/func-get-arg.xml b/reference/funchand/functions/func-get-arg.xml index 90ed26280c..ad102c0a4e 100644 --- a/reference/funchand/functions/func-get-arg.xml +++ b/reference/funchand/functions/func-get-arg.xml @@ -64,6 +64,15 @@ This function can now be used in parameter lists. + + 5.3.0 + + If this function is called from the outtermost scope of a file + which has been included by calling include + or require from within a function in the + calling file, it now generates a warning and returns &false;. + + @@ -102,6 +111,50 @@ foo (1, 2, 3); + + + <function>func_get_arg</function> example before and + after PHP 5.3 + + + +fga.php + +]]> + + + Output previous to PHP 5.3: + + + + + + Output in PHP 5.3 and later: + + + + + + diff --git a/reference/funchand/functions/func-get-args.xml b/reference/funchand/functions/func-get-args.xml index bfb0dd2b94..8360c1e6de 100644 --- a/reference/funchand/functions/func-get-args.xml +++ b/reference/funchand/functions/func-get-args.xml @@ -48,6 +48,15 @@ This function can now be used in parameter lists. + + 5.3.0 + + If this function is called from the outtermost scope of a file + which has been included by calling include + or require from within a function in the + calling file, it now generates a warning and returns &false;. + + @@ -94,6 +103,53 @@ Second argument is: 2
Argument 0 is: 1
Argument 1 is: 2
Argument 2 is: 3
+]]> + + + + + + <function>func_get_args</function> example before and + after PHP 5.3 + + + +fga.php + +]]> + + + Output previous to PHP 5.3: + + + 'First arg', + 1 => 'Second arg', +) +]]> + + + Output in PHP 5.3 and later: + + + diff --git a/reference/funchand/functions/func-num-args.xml b/reference/funchand/functions/func-num-args.xml index c93ac00d22..671ede2457 100644 --- a/reference/funchand/functions/func-num-args.xml +++ b/reference/funchand/functions/func-num-args.xml @@ -48,10 +48,63 @@ This function can now be used in parameter lists. + + 5.3.0 + + If this function is called from the outtermost scope of a file + which has been included by calling include + or require from within a function in the + calling file, it now generates a warning and returns -1. + + + + + <function>func_num_args</function> example before and + after PHP 5.3 + + + +fga.php + +]]> + + + Output previous to PHP 5.3: + + + + + + Output in PHP 5.3 and later: + + + + + +