PHP command line
26 Oct 2018PHP Cli
php -i
: like phpinfo(); you can usephp -i | less
to show detail one by one.php -f sample.php
: run php file in cli.php -r
: run php code in cli, likephp -r "print_r('hi');"
php -a
: Interactive shell for PHP 1
PHP server
start php server php -S localhost:8000 -t ./
check php model php -m | grep soap
Install xDebug via pecl
pecl install xdebug
PHP 5.4
Pear error “XML Extension not found” 2
sed -i "$ s|\-n||g" /usr/bin/pecl