17

According to a poll here on StackOverflow, NetBeans is the best PHP IDE available. This is all fine and good, except for one thing: It appears to be terrible at checking syntax. I'm sure I must be doing something wrong?

I've previously used phpDesigner, which is a great program, but I've only got version 2007, and it doesn't support xDebug (I'd have to buy the new version if I wanted that). So I thought I'd try the much vaunted (and free) NetBeans.

But, as far as I can tell, it's syntax checking is horrible. For example: Note how the same file is handled by the two different IDEs.

First phpDesigner:

phpDesigner

Pretty obvious where the problem is, right?

Then NetBeans:

NetBeans

Here there is nothing but a vague error message at the very bottom of the class, and it's not even near the function causing the error(!).

So my question is: Is it possible to get better syntax checking in NetBeans? I'm presuming there must be a way, and I'm just being really dumb.

Additionally: If this is not possible in NetBeans, what other free IDEs are available that do have this level of syntax checking?

Thanks for any help.


Some people have suggested Eclipse as a replacement, so I thought I'd test it.

Eclipse

It too correctly recognises the syntax error. (Makes me wonder if NetBeans is bugged.) I may just switch to Eclipse. Are there any other IDEs people think are worth trying?

13
  • 4
    You'll want to try JetBrain's PHPStorm. It's a commercial IDE, but it's really awesome. Commented Apr 12, 2011 at 14:21
  • 1
    For non-commercial IDEs, I'd use Aptana with PDT. Commented Apr 12, 2011 at 23:23
  • 2
    Have you checked if it's the same in Netbeans7? It's not released yet, but the beta version is available for download. It may be something they've worked on in the meanwhile. However, as much as I like netbeans (and I use it myself for PHP dev work), it is primarily written as a Java IDE; PHP will always be a second-class language for it compared with Java. Commented Apr 13, 2011 at 13:22
  • 1
    Note: To the people who have voted this "off-topic", it is on-topic as described in the SO:FAQ for being about "software tools commonly used by programmers". Commented Apr 13, 2011 at 15:23
  • 1
    Im on PhpDesigner version 7 and I love it. Does support xdebug and error checking as you show above is still very similar. Well worth the money. Aptana is also a good choice as mentioned above Commented Apr 13, 2011 at 23:21

2 Answers 2

4

Well it turns out that it's a bug in NetBeans. Here's the details of the bug:

http://netbeans.org/bugzilla/show_bug.cgi?id=168350

Update: It's been fixed in NetBeans 7.0.

Sign up to request clarification or add additional context in comments.

1 Comment

@Epoc I switched to PHPStorm and have not looked back! Miles better.
2

I don't now much about NetBeans but why don't you try Eclipse with PDT? It has better syntax checking as NetBeans. Using the example presented in your post Eclipse will display the same error message as PHPDesigner (and in the right place). Give it a try. Personally, I use (and love) VIM as an IDE, but at work we have to work with Eclipse and I think it will suits your needs.

2 Comments

I tried Eclipse, you're right, it did pick the error. Even quicker than phpDesigner 2007. Makes me wonder if NetBeans does have a bug in it afterall. Thanks for the recommendation, I'll see if I get any others.
glad that I could help. I don't think that there is any bug in NetBeans, that's the way NetBeans works :p

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.