![Summary of common commands under the php command line](https://img.php.cn/upload/article/000/000/020/5db3e3df593dc308.jpg)
1. php -m
Display the modules compiled into the kernel
![1572070254827959.png Summary of common commands under the php command line](https://img.php.cn/upload/image/835/924/919/1572070254827959.png)
2. php -v
Display php version number
![1572070260896736.png Summary of common commands under the php command line](https://img.php.cn/upload/image/270/613/686/1572070260896736.png)
3. php --ini
Display configuration file name
4. php -h
Display which command line commands are available
![1572070271985772.png Summary of common commands under the php command line](https://img.php.cn/upload/image/542/677/411/1572070271985772.png)
##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:
![1572070277277958.png Summary of common commands under the php command line](https://img.php.cn/upload/image/999/548/669/1572070277277958.png)
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!