NetBeans:PHP 语法检查

发布于 2024-10-31 15:50:08 字数 1077 浏览 2 评论 0原文

根据 StackOverflow 上的一项民意调查NetBeans 是最好的 PHP IDE。这一切都很好,除了一件事:它在检查语法方面似乎很糟糕。我确信我一定做错了什么?

我以前用过 phpDesigner,这是一个很棒的程序,但我只有 2007 版本,而且它不支持 xDebug(如果我想要的话,我必须购买新版本) )。所以我想尝试一下备受推崇的(而且免费的)NetBeans。

但是,据我所知,它的语法检查非常糟糕。例如:注意两个不同的 IDE 如何处理同一文件。

第一个 phpDesigner

phpDesigner

很明显问题出在哪里,对吧?

然后NetBeans

NetBeans

这里除了最底部的一条模糊的错误消息之外什么也没有。类,并且它甚至不靠近导致错误的函数(!)。

所以我的问题是:是否可以在 NetBeans 中获得更好的语法检查?我认为一定有办法,但我真的很愚蠢。

另外:如果这在 NetBeans 中不可能实现,那么还有哪些其他免费 IDE 可以提供这种级别的语法检查?

感谢您的任何帮助。


有些人建议使用 Eclipse 作为替代品,所以我想我应该测试一下它。

Eclipse

它也能正确识别语法错误。 (让我怀疑 NetBeans 是否被窃听。)我可能会切换到 Eclipse。还有其他人们认为值得尝试的 IDE 吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

缺⑴份安定 2024-11-07 15:50:08

事实证明这是 NetBeans 中的一个错误。以下是该错误的详细信息:

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

更新:它已在 NetBeans 7.0 中修复。

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.

时光清浅 2024-11-07 15:50:08

我现在对 NetBeans 不太了解,但是您为什么不尝试带有 PDT 的 Eclipse 呢?它具有比 NetBeans 更好的语法检查。使用您的帖子 Eclipse 中提供的示例将显示与 PHPDesigner 相同的错误消息(并且在正确的位置)。尝试一下。
就我个人而言,我使用(并且喜欢)VIM 作为 IDE,但在工作中我们必须使用 Eclipse,我认为它会满足您的需求。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文