Skip to content

Instantly share code, notes, and snippets.

@kaleb
Created July 21, 2016 18:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaleb/8b6fb95466cf994768bf13f23a1c873b to your computer and use it in GitHub Desktop.
Save kaleb/8b6fb95466cf994768bf13f23a1c873b to your computer and use it in GitHub Desktop.
Lint Old PHP Using Docker For Visual Studio Code
{
"php.validate.executablePath": "scripts/php.sh"
}

I am working on a project that is using a very old version of PHP, and I wanted to set up linting for it in the Visual Studio Code editor without having to install PHP 5.3 on my system. This setup seems to work pretty well.

#!/bin/sh
cat $8 | docker run --rm -i php:5.3 php -l -n -d display_errors=On -d log_errors=Off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment