#22790 [Opn->Fbk]: Parameter set in function definition fails
| From: | sniper@php.net | Date: | Wed, 19 Mar 2003 21:40:23 +0000 |
| Subject: | #22790 [Opn->Fbk]: Parameter set in function definition fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35964@lists.php.net to get a copy of this message | ||
ID: 22790
Updated by: sniper@php.net
Reported By: jasonzig at mac dot com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: MacOSX 10.2.4 & Redhat Linux
PHP Version: 4.3.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
I can not reproduce this with PHP 4.3.2-RC, using this script:
<?php
function pagemover($foobar, $debug='BOO') {
echo "debug = " . $debug . "\n";
}
pagemover('foo');
?>
Previous Comments:
------------------------------------------------------------------------
[2003-03-19 14:32:46] jasonzig at mac dot com
This seems to be a problem only when the function parameter is named
"debug". This definitely was not a problem in previous versions of PHP.
------------------------------------------------------------------------
[2003-03-19 14:12:16] jasonzig at mac dot com
FUNCTION PageMover ($command, $currentSurveyTemplateID,
$surveyTrackcer, $debug='BOO') {
echo "<hr>BEGIN FUNCTION PageMover()<br>" ;
echo "debug = " . $debug . "<br>";
echo "END FUNCTION PageMover()<hr>" ;
}
Calling this function without overwriting the $debug parameter will
result in this output:
BEGIN FUNCTION PageMover()
debug =
END FUNCTION PageMover()
In my previous version of PHP (4.2.3), this resulted in setting "debug"
to "BOO".
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22790&edit=1