note 24942 rejected from functions.arguments by jmcastagnetto

From: Date: Thu, 05 Sep 2002 21:00:05 +0000
Subject: note 24942 rejected from functions.arguments by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36204@lists.php.net to get a copy of this message
Unfortunately it looks like default values have to be constants. You can't ask that the default value be set by a function. For example this won't workor compile: a(); function a ($b=b()) { } function b() { return 1; } The error is: Parse error: parse error, unexpected '(', expecting ')' in /www/htdocs/jc/t.php on line 5

« previous php.notes (#36204) next »