php -w causes a parse error
| From: | Bom Demais | Date: | Thu, 26 Jan 2006 02:38:21 +0000 |
| Subject: | php -w causes a parse error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229287@lists.php.net to get a copy of this message | ||
I wanted to run "php -w" on my include files on the live server to reduce
overhead. But php -w causes parse errors in the include files. Here's an
example of what happens:
tanner /php_files
% php -l misc.inc
No syntax errors detected in misc.inc
tanner /php_files
% php -w misc.inc > misc.stripped.inc
tanner /php_files
% php -l misc.stripped.inc
PHP Parse error: parse error, unexpected '&', expecting ']' in
misc.stripped.inc on line 2
Parse error: parse error, unexpected '&', expecting ']' in misc.stripped.inc
on line 2
Errors parsing misc.stripped.inc
Of course i try to look at line 2 to see what the error is, but now the
whole file is on line 2, so there's no way to know what's breaking!
please let me know if you have any suggestions.
Thanks!