Calling A Class Variable as a Default for an Argument in a Function

From: Date: Tue, 06 Jun 2000 16:21:54 +0000
Subject: Calling A Class Variable as a Default for an Argument in a Function
Groups: php.general 
Request: Send a blank email to php-general+get-1134@lists.php.net to get a copy of this message
Hiya. I'm working on a class for myself, and though reading the manual, I found that you could specify defaults for various arguments. I built a function in a class (like below), and ran it. The first three arguments are fine, but I run into trouble with the forth. It refuses to let me use it saying 'Parse Error in ??? on line ???'. The manual doesn't seam to say much on the matter, only talking about the first three cases. function start($one, $two = "", $three = "three", $four = $this->four) { return ($one, $two, $three, $four); } It is possible to use the forth argument, and am I doing something wrong, or is it not possible? Thanks. - - - - - - - - - - - - - - - - - - - - Jonathan Wright [DjNA] mail@djna.fsnet.co.uk www.djna.fsnet.co.uk ICQ [21961373]

« previous php.general (#1134) next »