PHP Syntax check not working - linter not working

669 views Asked by At

My php linter is not working from Atom or the Command line.

CMD: php -l <filename>

Result: No syntax errors detected in C:\example\path\file.php


Running:

  • Windows 10
  • php 7.3.11

Things already checked:

  • yes, the file really exists
  • liner is installed (version 2.3.1)
  • linter-php is installed (version 1.6.1)
  • other linters work fine
  • path to php.exe is defined in the package and config.json
1

There are 1 answers

0
Milk Man On

Solution short_open_tag=On in php.ini was set to Off needs to be On for linter to catch errors if you are using short tags <? vs <?php.

Hope this helps someone else.