There is a long discussion about this in the coder issue queue (http://drupal.org/node/121388). I personally favor all upcase and don't see any reason to change what is a standard convention familiar to many people without overwhelming evidence of the need to change it. I also have to say that I feel that coder module should not be establishing coding standards for Drupal, but instead these things should be discussed and agreed upon in the community and then coder module implement them. We do have a Coding Standards page in the handbook and I think that should be the closest thing to a canonical reference for Drupal code. - Addi On Aug 27, 2007, at 2:13 PM, David Strauss wrote:
I personally prefer uppercase because it's more consistent with other constants. What source says lowercase is faster?
Steve Rude wrote:
So I was trying to research a coding standard that I don't see documented anywhere. What is the standard about NULL, TRUE and FALSE. According to the coder module it says to use lowercase because it is faster, but throughout core there is uppercase.
e.g. in the system.module (not to mention the trailing comma is missing...)
/** * Implementation of hook_menu(). */ function system_menu($may_cache) { $items = array();
if ($may_cache) { $items[] = array('path' => 'system/files', 'title' => t('File download'), 'callback' => 'file_download', 'access' => TRUE, 'type' => MENU_CALLBACK);
I know this is a very minor point, but we are trying to match our internal coding standards with that of Drupal.
Thanks!
Steve Rude