Skip to content

Instantly share code, notes, and snippets.

@IngmarBoddington
Last active December 12, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IngmarBoddington/4753727 to your computer and use it in GitHub Desktop.
Save IngmarBoddington/4753727 to your computer and use it in GitHub Desktop.
Commands for using php and associated tools in terminal | Key: <value> type of value will be hinted by string when relevant | [<optionalValue>] | <file(s)> means single filename or multiple space delimited filenames | <int> means an integer | <int|range> means an integer or a range (two integers seperated by hyphen) | <string> means a quoted value
php
- Start interactive session
php -f <filename>
- Run specified script from cli
php -i
- Show PHP info
php -m
- Show compiled extensions
php -c /path/to/php.ini -r 'echo get_include_path()."\n";'
- Example setting checker
pear channel-discover <channel>
- Add a channel to pear (a repo)
pear install <package>
- Install a package using PEAR
pear list -a
- List all installed packages
phpdoc -d <directory> -t <target>
- PHPDocument directory to target
- Install using PEAR (package = PhpDocumentor)
phpcs [--standard=<standard>] <filename>
- Sniff a file with PHP Code Sniffer using an optional standard
- Install using PEAR (package = PHP_CodeSniffer)
phpunit
- Run unit tests
- Install using PEAR (channel = pear.phpunit.de, package = phpunit/PHPUnit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment