Pretty straight forward question. I'm quite happy with my simple text editor but sometimes it'd be nice to run something like PyFlakes on my code before running to check for any obvious errors like undeclared variables or syntax errors.
Asked
Active
Viewed 573 times
2 Answers
4
The previous answer is wrong - the question is neither a duplicated nor does the given command do what "pyflakes" does.
"pyflakes" is a python project that integrates with Vim, and allows you to check for interpreter errors in your python code live (as you are coding).
However, i am not aware of any existing vim extension which replicates the functionality of pyflakes for PHP code.

rojaro
- 63
- 5
-
1Umm, Orbit gave me just the answer I was looking for, so, no, I wouldn't say it's wrong. I was not asking about the specific vim plugin – I actually use the command line version. – pr1001 Apr 19 '11 at 08:59
2
Just run this:
php -l filename

hichris123
- 10,145
- 15
- 56
- 70

Brandon Frohbieter
- 17,563
- 3
- 40
- 62
-
Not exactly - no warnings for undeclared variables, no warnings for using "+" with strings (which php idiotically turns to 0), it seems to do just what it says in man php - "Syntax check only (lint)" – NoBugs Jan 27 '15 at 15:20