#22790 [Fbk->Csd]: Parameter set in function definition fails

From: Date: Mon, 24 Mar 2003 10:21:36 +0000
Subject: #22790 [Fbk->Csd]: Parameter set in function definition fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36265@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: Feedback +Status: Closed Bug Type: Scripting Engine problem Operating System: MacOSX 10.2.4 & Redhat Linux PHP Version: 4.3.0 New Comment: No feedback, and apparently fixed in CVS already. Previous Comments: ------------------------------------------------------------------------ [2003-03-19 15:40:23] sniper@php.net 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'); ?> ------------------------------------------------------------------------ [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

« previous php.bugs (#36265) next »