Skip to content

Instantly share code, notes, and snippets.

@NoMan2000
Created July 17, 2015 04:11
Show Gist options
  • Save NoMan2000/8d45e1cc33cfcde982cc to your computer and use it in GitHub Desktop.
Save NoMan2000/8d45e1cc33cfcde982cc to your computer and use it in GitHub Desktop.
Command line php Linting
php -n -l -d display_errors -d display_startup_errors path/to/your/phpfile.php
@NoMan2000
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment