IngmarBoddington
2/11/2013 - 10:33 AM

Commands for using php and associated tools in terminal | Key: <value> type of value will be hinted by string when relevant | [<optionalValu

Commands for using php and associated tools in terminal | Key: type of value will be hinted by string when relevant | [] | <file(s)> means single filename or multiple space delimited filenames | means an integer | <int|range> means an integer or a range (two integers seperated by hyphen) | 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)