till schreef:
Hi,

was wondering what the best practise for comments inside the code is.
I know that on classes/methods you use a Javadoc block, but what about
inline?

For example:

/**
* ...
*/
function foo()
{
  // Some comment here
  $bar = 'whatever';
}

Is it totally acceptable to do this ("// Some comment here"), or is
there anything else to do instead. Or should I do a full Javadoc block
as well?

Thanks,
Till



Inline comment should have a single star instead of. eg:

/*
* This is a comment on
* multiple lines
*/

However, if it's only one line:

// this is a comment on one line ...


Best,

--
Andries Seutens
http://andries.systray.be

Gecontroleerd op virussen door de JOJO Secure Gateway.

Reply via email to