如何使 Zend IDE 5.5.1 不关心反斜杠?

发布于 2024-07-15 01:28:36 字数 156 浏览 5 评论 0原文

我使用 Zend IDE,并且经常使用分析代码来快速查找未声明或未使用的变量。 与所有 PHP 开发人员一样,我也使用正则表达式。

所以主要问题是在哪里设置复选框或调整配置文件以禁用这些警告:

错误的转义序列:\s(NN 行)

感谢您的回答!

I use Zend IDE and quite often use Analyze code to quickly find undeclared or unused variables. As all PHP developers I also use regular expressions.

So main question is where to set a checkbox or tune config file to disable these warnings:

Bad escape sequence: \s (line NN)

Thanks for answers!

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

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

发布评论

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

评论(3

独夜无伴 2024-07-22 01:28:36

窗口->首选项->php->代码分析器->bug->bas转义序列

window->preferences->php->code analyzer->bug->bas escape sequence

为什么不直接纠正输入错误的字符串声明呢? 如果您有正则表达式 foo\sbar,请将其写为:

'foo\\sbar'
"foo\\sbar"

Why don’t you just correct the mistyped string declarations. If you have the regular expression foo\sbar, write it as:

'foo\\sbar'
"foo\\sbar"
对风讲故事 2024-07-22 01:28:36

我听从了@SMka 的建议,并且工作得非常顺利。 但是,对于我的 Zend Studio (10.1) 版本,选项是:
窗口 -> 首选项 -> 语义分析属性

从那里,只需将“字符串中的错误转义序列”设置为“忽略”。

请记住,我并不是建议在每种情况下都进行更改。 这就是我想要的,因为标记了我所有的正则表达式(正则表达式。已经工作了多年,所以没有理由因为警告而更改它们)。

希望这可以帮助...

I followed the suggestion from @SMka and worked like a charm. However, for my version of Zend Studio (10.1), the option was:
Window->Preferences->Semantic Analysis Properties

From there, just set "Bad escape sequence in string" to Ignore.

Keep in mind that I'm not suggesting to change it in every case. This was what I wanted because was flagging all my regexp (reg exps. that have been working for years, so no reason to change them because of a warning).

Hope this helps...

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