
1. php -m
Display the modules compiled into the kernel

2. php -v
Display php version number

3. php --ini
Display configuration file name
4. php -h
Display which command line commands are available

##5. php --info
View class/function/extension information, just like using phpinfo() on the web server
6. php --rf
Display information about the function7. php --rc Display information about the class8. php --re Display information about the extension9. php --ri Display the configuration information of the extension 10. php --rz Display name information about zend extension11. About the development of command line scripts (1) $argv is an array containing The provided parameters, the first parameter is the name of the file(2)$argc is the number of parameterseg:We have an index.php This script<?php
echo '命令行参数个数: ' . $argc . "n";
echo "命令行参数:n";
foreach ($argv as $index => $arg) {
echo " {$index} : {$arg}\n";
}
Copy after login
We run php index.php from the command line 1 2 3The output results are as follows:

The above is the detailed content of Summary of common commands under the php command line. For more information, please follow other related articles on the PHP Chinese website!