Is this a bug? Default params?

From: Date: Mon, 09 Aug 1999 16:25:53 +0000
Subject: Is this a bug? Default params?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3239@lists.php.net to get a copy of this message
This Function isAdmin($username = "$login[username]") { return 0; } Was valid under php 3.0.5, but the first line gives a parse error with php4. As does Function isAdmin($username = $login[username]) { and Function isAdmin($username = $login["username"]) { and Function isAdmin($username = "$login[\"username\"]") { Should it have worked in php3 (it did)? Why doesn't it now? Are only constants allowed as default params??? Sam

« previous php.version4 (#3239) next »