PHP - Eclipse PDT - 突出显示未初始化(拼写错误)的变量
我使用出色的 Eclipse PDT 进行 PHP 开发。
由于变量名称拼写错误,我经常遇到令人恼火的错误。
有没有办法突出显示尚未初始化的变量? 因为它们几乎肯定是由于拼写错误造成的。
谢谢你的帮助。
I use the wonderful Eclipse PDT for PHP development.
I often encounter irritating bugs due to me misspelling variable names.
Is there a way to highlight variables that have not been initialized? As they will almost certainly be due to a spelling mistake.
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不会。由于 PHP 的动态性,有时甚至是 hackish 性质,如果 IDE 认为未声明的变量带有下划线,总体来说会很痛苦。 由于许多函数可以自己声明变量(例如 extract) ,这将是一个主要障碍。
No. Due to the dynamic, sometimes hackish nature of PHP, it would overall be a pain to have variables that the IDE thinks is undeclared be underlined. Since many functions can declare variables on their own (such as extract), this would be a major hindrance.
zend studio 有这个功能,所以我不确定我们是否会在 pdt 中看到它,它还会突出显示无法访问的代码等。
zend studio has this feature so i'm not sure if we'll see it in pdt, it will also highlight unreachable code, etc.
带有 PHPParser 插件的 JEdit 就有这样的功能,IIRC。 虽然我已经很久没有尝试过了,但我可能是错的。
JEdit with PHPParser plugin had that, IIRC. It's been long since I tried it, though, I might be wrong.