RE: [PHP] define constants within functions?

From: Date: Tue, 10 Aug 2004 14:16:43 +0000
Subject: RE: [PHP] define constants within functions?
Groups: php.general 
Request: Send a blank email to php-general+get-193270@lists.php.net to get a copy of this message
[snip] If I define a constant within a function, it appears that the constant is only defined within the namespace of the function. Fair enough. Can I globalise these definitions? [/snip] They should be global already... http://us3.php.net/manual/en/language.constants.php "Like superglobals, the scope of a constant is global. You can access constants anywhere in your script without regard to scope. For more information on scope, read the manual section on variable scope."

« previous php.general (#193270) next »