Home >Backend Development >PHP Tutorial >Common commands under the php command line

Common commands under the php command line

不言
不言Original
2018-03-30 15:10:463238browse

This article shares with you some common commands under the PHP command line. Friends in need can refer to it

1 php -m
Display modules compiled into the kernel

Common commands under the php command line

2 php -v
Display php version number

Common commands under the php command line

## 3 php --ini

Display the configuration file name

Common commands under the php command line

4 php -h

Display which command line commands are available

Common commands under the php command line

5 php --info

View class/function/extension information, the same as using phpinfo() on the web server

6 php --rf

Display information about the function

7 php --rc

Display information about the class

8 php --re

Display information about the extension

9 php --ri

Display the configuration of the extension Information

10 php --rz

Display name information about zend extension

11 About the development of command line scripts

(1)$argv Is an array containing the provided parameters, where the first parameter is the name of the file

(2) $argc is the number of parameters

eg:

We have an index.php script

#echo 'Number of command line parameters: ' . $argc . "n";

echo "Command line parameters: n";
foreach ($argv as $index =>

#Related recommendations:

Common commands under the php command linephp Common Commands_PHP Tutorial

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn