note 78407 deleted from functions.arguments by felipe

From: Date: Sun, 16 Dec 2007 12:36:07 +0000
Subject: note 78407 deleted from functions.arguments by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133705@lists.php.net to get a copy of this message
Note Submitter: jbarnett at flowershopnetwork dot com ---- The documentation says, "The default value must be a constant expression, not (for example) a variable, a class member or a function call." Class constants (and presumably global constants) can be used: <?php class Foo { const BAR = "constant value"; public function myMethod($arg = self::BAR) { echo $arg; // IT WORKS! } } ?>

« previous php.notes (#133705) next »