Well, I would suggest (if project is really large) to start from Functional Design. This means, just in plain English (or any other language) description of your application. For example:
“On login page, user must provide valid username (e-mail) and password. If this matches database values, user will be logged in and his credientals will be stored in session”.
Once you have FD (Function Design), you can start working on Technical Design (TD). This is heavy technical documenatation, in which you should describe working of your application. On same example as above (login):
“On the login page, two text input fields with maximum value of 60 characters will be displayed. Both fields are mandatory otherwise error page will be shown. Input values will be matched against database, table X, fields A and B, whereby field B will be encrypted using encryption as described in Appendix A…”
And so on. This is only propper way of documenting projects.
Beside this, I would also suggest to use PHPDocumentator lines, such as:
/**
* @desc This function is used to validate login creditentials on login page
*
* @param integer $email, email address (username);
* @param integer $pass, password;
* @return boolean
*
* @author John Doe
* @version 0.1, 6 February 2012
*/
function login();
Cheers,
Smilie