Home Download Buy Blog Forum Support

How are PHP files syntax checked?

How are PHP files syntax checked?

Postby ssteinerX on Sun Aug 07, 2011 6:08 pm

Hi!

I use the pylint plugin for my Python code and have been able to tweak it just right for my coding needs.

I notice that PHP seems to get checked somehow as well, since dumb things like leaving off a semi-colon get me an error indicator outline around the affected code.

Does anyone know where I can fine-tune the settings used during that check?

I'd like to get as much help in PHP as possible since I find debugging it at runtime to be a nightmare due to some of its "helpful" behaviours; like setting undeclared variables to NULL or 0 or "" etc.

Thanks,

S
ssteinerX
 
Posts: 19
Joined: Tue May 03, 2011 2:50 pm

Re: How are PHP files syntax checked?

Postby alexrussell on Mon Aug 08, 2011 10:44 am

The PHP is checked using the command line PHP executable with the "-l" option. As far as I'm aware there's very little (if anything) you can fine tune about this, as PHP's linting is inbuilt to the PHP, and PHP as a language is pretty strict on its syntax. Variable typing is quite relaxed, but this checker just checks the syntax as far as I'm aware, which as I just said is quite strict.

Check out http://www.php.net/manual/en/features.commandline.options.php for an idea of how `php -l` works.
alexrussell
 
Posts: 74
Joined: Fri Jul 15, 2011 9:06 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 23 guests