#34120 [Opn]: func_get_arg() can not be used more than once in function calls
From: ondrej at sury dot org Date: Sat, 13 Aug 2005 11:59:27 +0000 Subject: #34120 [Opn]: func_get_arg() can not be used more than once in function calls References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-83516@lists.php.net to get a copy of this message
ID: 34120
User updated by: ondrej at sury dot org
Reported By: ondrej at sury dot org
Status: Open
Bug Type: Scripting Engine problem
Operating System: Linux
-PHP Version: 4.4.0
+PHP Version: 4.4.0, 5.0.4
New Comment:
Happens in php 5.0.4 as well
Previous Comments:
------------------------------------------------------------------------
[2005-08-13 13:58:46] ondrej at sury dot org
Description:
------------
func_get_arg() can be used as argument to function only once.
Reproduce code:
---------------
<?php
function doTitle($a = NULL, $b = NULL) {
print "doTitle: $a, $b\n";
}
function doHead() {
doTitle(func_get_arg(0));
doTitle(func_get_arg(1));
doTitle(func_get_arg(0), "3");
doTitle(func_get_arg(0), func_get_arg(1));
}
doHead("1", "2");
?>
Expected result:
----------------
doTitle: 1,
doTitle: 2,
doTitle: 1, 3
doTitle: 1, 2
Actual result:
--------------
doTitle: 1,
doTitle: 2,
doTitle: 1, 3
Fatal error: func_get_arg(): Can't be used as a function parameter in
/tmp/func_get_arg.php on line 11
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34120&edit=1
Thread (12 messages)
- #34120 [Opn]: func_get_arg() can not be used more than once in function calls
- #34120 [Opn->Bgs]: func_get_arg() can not be used more than once in function calls
- #34120 [Bgs]: func_get_arg() can not be used more than once in function calls
- #34120 [Bgs->Opn]: func_get_arg() can not be used more than once in function calls
- #34120 [Opn]: func_get_arg() can be used function call parameter if used only once
- #34120 [Opn->Ver]: func_get_arg() can be used function call parameter if used only once
- #34120 [Ver->Asn]: func_get_arg() can be used function call parameter if used only once
- #34120 [Com]: func_get_arg() can be used function call parameter if used only once
- #34120 [Asn]: func_get_arg() can be used function call parameter if used only once
- #34120 [Asn]: func_get_arg() can be used function call parameter if used only once
- #34120 [Asn->WFx]: func_get_arg() can be used function call parameter if used only once
| « previous | php.bugs (#83516) | next » |
|---|