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:
Pretty obvious where the problem is, right?
Then 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.
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?
The PHP Editor in NetBeans IDE 6.9-7.0 supports all standard features such as code completion, syntax highlighting, mark occurrences, refactoring, code templates, documentation pop-up, code navigation, editor warnings and task list.
Apache NetBeans provides editors, wizards, and templates to help you create applications in Java, PHP and many other languages. Cross Platform. Apache NetBeans can be installed on all operating systems that support Java, i.e, Windows, Linux, Mac OSX and BSD. Write Once, Run Anywhere, applies to NetBeans too.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With