inheriting default constructor behavior?
| From: | Monique Y. Herman | Date: | Thu, 19 Sep 2002 03:25:08 +0000 |
| Subject: | inheriting default constructor behavior? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-116837@lists.php.net to get a copy of this message | ||
My question is regarding default arguments -- is it possible to define a default
argument that is itself a variable?
I'd like to do the following:
function archive ($max_size = 20560, $archive_dir = "${DOCUMENT_ROOT}/tmp/")
but I seem to get parse errors unless I do the following:
function archive ($max_size = 20560, $archive_dir = "/var/www/tmp/")
Is it possible to do something approaching the latter?
Monique Y. Herman
monique@mailsnare.net