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!
From stackoverflow
-
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"
Mr.ElectroNick : Unfortunately no. That would be MY bug, but I'm getting these messages with something like preg_match("|^a\sb$|is",$a,$b);Gumbo : 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)Mr.ElectroNick : 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! -
window->preferences->php->code analyzer->bug->bas escape sequence
Mr.ElectroNick : 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.
0 comments:
Post a Comment