You are here: User Guide > Concepts > Code Commenting

Code Commenting

Commenting your code involves adding characters (normally slashes and stars) which mark certain areas of code as 'comments'.

Comments are used for reference information only and will not be run as part of your code. It is good programming practice to comment all functions, classes and methods in your code. This helps both the developer and others who might look at the code to understand its purpose.

 

Comments can be either single line or multi-lined:

// This is a single line comment.

/* This is

a comment

on multiple

lines

*/

Note:

Code Commenting will also be available for JavaScript elements if JavaScript support was enabled for the project. See Enabling JavaScript Support in PHP Projects for more information.

 

 

Related Links:

Adding Comments

phpDoc Comments

Commenting PHP DocBlocks

 

 

©1999-2012 Zend Technologies LTD. All rights reserved.