ID: 34120
Updated by: derick@php.net
Reported By: ondrej at sury dot org
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.4.0, 5.0.4
New Comment:
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
.
Previous Comments:
------------------------------------------------------------------------
[2005-08-13 13:59:26] ondrej at sury dot org
Happens in php 5.0.4 as well
------------------------------------------------------------------------
[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