tags:

views:

196

answers:

2

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!

+1  A: 

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"
Gumbo
Unfortunately no. That would be MY bug, but I'm getting these messages with something like preg_match("|^a\sb$|is",$a,$b);
Mr.ElectroNick
Replace it by `preg_match("|^a\\sb\$|is",$a,$b);` or `preg_match('|^a\\sb$|is'$a,$b);`. (See http://docs.php.net/manual/en/language.types.string.php)
Gumbo
Well... Sadly I was looking like a novice with this question. Working with PHP for 7 years :-) But. I was impressed having [preg_match("|^a\sb$|is","a b",$out)] and [preg_match("|^a\\sb$|is","a b",$out)] working but second one wasn't ague with analyzer. Thanks!
Mr.ElectroNick
A: 

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

SM
There's no window menu item. I use Zend 5.5.1 where only following File, Edit, Search, Go to, Project, View, Debug, Tools, Help items.
Mr.ElectroNick