#34120 [Opn->Ver]: func_get_arg() can be used function call parameter if used only once
| From: | sniper@php.net | Date: | Sat, 13 Aug 2005 18:23:36 +0000 |
| Subject: | #34120 [Opn->Ver]: func_get_arg() can be used function call parameter if used only once | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83537@lists.php.net to get a copy of this message | ||
ID: 34120
Updated by: sniper@php.net
Reported By: ondrej at sury dot org
-Status: Open
+Status: Verified
Bug Type: Scripting Engine problem
-Operating System: Linux
+Operating System: *
-PHP Version: 5.0.4, 4.4.0
+PHP Version: 5CVS, 4CVS (2005-08-013)
New Comment:
Manual says:
"Note: Because this function depends on the current scope to determine
parameter details, it cannot be used as a function parameter. If you
must pass this value, assign the results to a variable, and pass the
variable."
Previous Comments:
------------------------------------------------------------------------
[2005-08-13 14:44:15] ondrej at sury dot org
I am doing bug triage in Debian BTS and this bug was there...
Sooo, if you are ever bored, feel free to fix it :-).
Ondrej.
------------------------------------------------------------------------
[2005-08-13 14:38:51] derick@php.net
Well, that's true then. But I'm not sure how important this bug is :)
------------------------------------------------------------------------
[2005-08-13 14:37:03] ondrej at sury dot org
Hi Derrick,
I don't consider to be bug, that it cannot be used as function
argument.
However I consider to be bug, that it CAN be used if you use it only
once.
This works:
doTitle(func_get_arg(0));
This works also:
doTitle(func_get_arg(1));
So it should not work at all, to be consistent.
Ondrej.
------------------------------------------------------------------------
[2005-08-13 14:25:47] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
------------------------------------------------------------------------
[2005-08-13 13:59:26] ondrej at sury dot org
Happens in php 5.0.4 as well
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34120
--
Edit this bug report at http://bugs.php.net/?id=34120&edit=1