From:             [EMAIL PROTECTED]
Operating system: Red Hat Linux 7.2
PHP version:      4.2.2
PHP Bug Type:     Documentation problem
Bug description:  function only accepts scalars or constants as default values

Could you add to the docs in the section on functions and default argument
values that default values can only be scalers or constants?

these won't work:

1- function a ($b = $val) {}

2- function b ($a = another_function()) {}

This link offers some workarounds, eventhough it would be really nice to
be able to do #2, don't you think ;)

http://marc.theaimsgroup.com/?l=php-general&m=91877248424055&;
-- 
Edit bug report at http://bugs.php.net/?id=19252&edit=1
-- 
Try a CVS snapshot:  http://bugs.php.net/fix.php?id=19252&r=trysnapshot
Fixed in CVS:        http://bugs.php.net/fix.php?id=19252&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=19252&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=19252&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=19252&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19252&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=19252&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=19252&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=19252&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=19252&r=globals


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to