ID: 34120
User updated by: ondrej at sury dot org
Reported By: ondrej at sury dot org
Status: Assigned
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5CVS, 4CVS (2005-08-013)
Assigned To: dmitry
New Comment:
I disagree, this function should fail even when used as first argument
(also according to docs).
If you allow it to be passed as first argument, but not as second or
third, etc., you create only chaos.
It's much more cleaner to let it fail everytime.
Previous Comments:
[2005-09-01 15:55:34] [EMAIL PROTECTED]
Right.
I think this shouldn't be fixed.
[2005-08-25 21:54:45] csaba at alum dot mit dot edu
Note: Because this function depends on the current scope to determine
parameter details, it may only appear in the first argument to a
function. Thus
myfunc1 (myfunc2 (func_get_arg(1), 7)) OK
myfunc1 (myfunc2 (7, func_get_arg(0))) Error
myfunc1 (7+func_get_arg(0)+func_get_arg(1))OK
myfunc2 (func_get_arg(0), func_get_arg(1)) Error
If you must pass this value of func_get_arg() not in the first
argument, assign the results to a variable, and pass the variable."
Csaba Gabor from Vienna
[2005-08-15 23:08:45] [EMAIL PROTECTED]
Dmitry, this script should fail for all of those:
http://bugs.php.net/34120
--
Edit this bug report at http://bugs.php.net/?id=34120&edit=1