From:             martin at lucas-smith dot co dot uk
Operating system: Win2K
PHP version:      4.3.3
PHP Bug Type:     Unknown/Other Function
Bug description:  Parse error if using server variables as default function argument 
value

Description:
------------
Is there some reason why a $_GET or other server variable cannot be
included directly within a function declaration, as its default value?

If using the reproduce code below I get a parse error:

Parse error: parse error, unexpected T_VARIABLE in [scriptaddress] on line
[linenumber]


Reproduce code:
---------------
function queryParameters ($queryString = $_GET['QUERY_STRING'])
{
        # Do something with $queryString
}


-- 
Edit bug report at http://bugs.php.net/?id=25341&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25341&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25341&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25341&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25341&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25341&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25341&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25341&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25341&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25341&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25341&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25341&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25341&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25341&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25341&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25341&r=gnused

Reply via email to