Question

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!

Was it helpful?

Solution

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"

OTHER TIPS

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

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...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top