Re: PEAR Coding Standards

From: Date: Fri, 13 Dec 2002 21:57:32 +0000
Subject: Re: PEAR Coding Standards
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11634@lists.php.net to get a copy of this message
On Fri, 13 Dec 2002 22:53:13 +0100 Mirco "MEEBEY" Bauer <pear-dev@meebey.net> wrote: > > oh, the standard is just saying to use the categorie name as constant > prefix? so NET_TYPE_MESSAGE would be ok? SMARTIRC_TYPE_MESSAGE paste from doc (****==to read carefully): Constants Constants should always be all-uppercase, with underscores to separate words. Prefix constant names with the uppercased name of the ****class/package*** they are used in. For example, the constants used by the DB:: package all begin with "DB_". Global Variables If your package needs to define global variables, their name should start with a single underscore followed by the ****package name**** and another underscore. For example, the PEAR package uses a global variable called$_PEAR_destructor_object_list. As another advice, the last for today, trying to reduce name length for a lazy reason is really not a good idea... pierre

« previous php.pear.dev (#11634) next »