sabba
sabba

Reputation: 23

How to add comments in PHP Eclipse?

How can I add comments in PHP eclipse? I'm trying by selecting few lines of code, then right click, On menu, "Source" and then I have tried all these options there "general element comment", "toggle comment", "Add block comment". None of them works. PS. I just downloaded latest eclipse PHP version.

Upvotes: 2

Views: 3428

Answers (4)

Lavy John
Lavy John

Reputation: 59

I was using single line comments on my eclipse php project. When i uploaded it to server ,some obfuscation has been applied automatically.Hence all the line breaks are removed and it treating the whole program as a single line. so i am getting an END OF STATEMENT error on server.So its better to use /--/ instead of //---- while commenting.

Upvotes: 0

gaRex
gaRex

Reputation: 4215

It`s a bug in latest PHP eclipse. Fix is here.

Upvotes: 0

user743234
user743234

Reputation:

Why don't you just try adding /** + enter? It will produce something like

/**
 * Comment here
 */

Remember to follow the doc order

/**
 * Description
 * @param argument/parameter
 * @return
 */

Upvotes: 2

silex
silex

Reputation: 4320

Try Ctrl+Shift+/

The question is similair to How to comment a block in Eclipse?

Upvotes: 2

Related Questions