2013-08-24 01:00:37 +02:00
|
|
|
# To view the php version:
|
2013-08-24 00:32:36 +02:00
|
|
|
php -v
|
|
|
|
|
2013-08-24 01:00:37 +02:00
|
|
|
# To view the installed php modules:
|
2013-08-24 00:32:36 +02:00
|
|
|
php -m
|
|
|
|
|
2013-08-24 01:00:37 +02:00
|
|
|
# To view phpinfo() information:
|
2013-08-24 00:32:36 +02:00
|
|
|
php -i
|
|
|
|
|
2013-08-24 05:06:29 +02:00
|
|
|
# To lint a php file:
|
|
|
|
php -l file.php
|
|
|
|
|
|
|
|
# To lint all php files within the cwd:
|
|
|
|
find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
|
|
|
|
|
|
|
|
# To enter an interactive shell:
|
|
|
|
php -a
|
|
|
|
|
2013-08-24 01:00:37 +02:00
|
|
|
# To locate the system's php.ini files:
|
2013-08-24 00:32:36 +02:00
|
|
|
php -i | grep "php.ini"
|
|
|
|
|
2013-08-24 01:00:37 +02:00
|
|
|
# To start a local webserver for the cwd on port 3000 (requires php >= 5.4):
|
2013-08-24 00:32:36 +02:00
|
|
|
php -S localhost:3000
|