Created
July 17, 2015 04:11
-
-
Save NoMan2000/8d45e1cc33cfcde982cc to your computer and use it in GitHub Desktop.
Command line php Linting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -n -l -d display_errors -d display_startup_errors path/to/your/phpfile.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, I had also manually checked the error_reporting in the php.ini file and found it set to E_ALL & E_STRICT
but then I found this thread:
http://forums.phpfreaks.com/topic/37506-solved-error-reporting-in-php-5x/
So I changed the value of error_reporting to E_ALL | E_STRICT and immediately SublimeLinter started highlighting errors.
Takeaway message:
If the only output of: php -l -d display_errors=0 -d error_log='' test.php is just Errors parsing test.php without any line number references, you need to fix your error_reporting level
@robrecord
robrecord commented on Sep 14, 2013
also try looking fro & removing this line in php.ini:
xdebug.cli_color = 2