Supported Versions

show PHP information
php -i

list loaded PHP modules
php -m

enable PHP Module
php5enmod amqp
/etc/init.d/apache2 reload

Show includes
php --ini

Run PHP built-in web server
php -S -t /var/www/

PHP syntax check
php -l FILE.php

# define parameter
php -d date.timezone="Europe/Berlin" -f

Error reporting
# report all errors except notices
error_reporting = E_ALL & ~E_NOTICE

#syntax check
find . -type f -name "*.php" -exec php -l {} \; | grep -v 'No syntax errors'

# PHP_CodeSniffer

# Debian: compile and install multiple PHP cli versions

convert line break to html
echo nl2br($content)

Calculate PHP error reporting
php_admin_value error_reporting 31735

# search for short_open_tag
grep -RlIP '^<\?\n' *