Date: 09/15/01
- Next message: mfischer <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- Previous message: rex <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- Next in thread: mfischer <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Reply: mfischer <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Reply: php <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Reply: hholzgra <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: php <email protected>
Operating system: WIN98/APACHE1.3.19
PHP version: 4.0.4pl1
PHP Bug Type: *General Issues
Bug description: problem with function definitions
<?php
$foo = 'foo';
function showvar( $bar = $foo )
{
//global $foo
//doesn't work either
echo $bar;
}
showvar();
showvar('bar');
?>
gives me a parse error on line 3:(
also:
<?php
$foo = 'foo';
function returnvar()
{
global $foo;
return $foo;
}
function whatisvar( $bar = returnvar() )
{
echo $bar;
}
?>
gives me this:
Parse error: parse error, expecting `')'' in c:/path/to/script/test.php on
line 9
Should work, shouldn't it?
-- Edit bug report at: http://bugs.php.net/?id=13315&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: mfischer <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- Previous message: rex <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- Next in thread: mfischer <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Reply: mfischer <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Reply: php <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Reply: hholzgra <email protected>: "[PHP-DEV] Bug #13315 Updated: problem with function definitions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

