$Id: HACKING,v 1.4 2002/10/15 17:41:07 djresonance Exp $

Code contributions and patches are welcome!  Please try to stick to the
following guidelines when working on phpTest:

* turn your error_reporting to E_ALL in the php.ini file.  No notices
  should be generated by any new code.  This requires some changes from
  regular coding style, basically just make sure to test for variables
  before assuming they are present.  For example

  if ($HTTP_POST_VARS['submit']) {

  will generate a notice.  Instead use this:

  if (isset($HTTP_POST_VARS['submit'])) {

  Also note the difference between empty() and isset(): empty
  returns true if EITHER the variable is not set or it is 0. isset() only
  returns true of the variable is set.

* turn off register_globals in the php.ini file.  All code should work
  with register_globals off.  There is a function called 'pt_register'
  that allows you to import variables from the global namespace for
  use in your code.  For example, to register the PHP_SELF var, you
  would do the following:

  pt_register('SERVER', 'PHP_SELF');

  You can find out more information about pt_register by looking at the
  comments in functions.inc.php

* coding style

  Please use spaces instead of tabs.  4 spaces between indentation blocks.
  Don't use the short form of if{ } i.e. if($x) do_something; Instead:

  if ($x) {
      do_something;
  }

  Place a line of whitespace before and after each new control structure
  Use all lower case for variable names, with words seperated by an underscore
  Use all uppercase for new constants

* functions

  Put any new functions in functions.inc.php.  All functions should be prefixed
  by 'pt_'.

* help
  If you have any questions at all, give me an email.  I'd be glad to help.