Summarize some common commands under the php command line

藏色散人
Release: 2023-04-09 17:12:01
forward
4218 people have browsed it

Recommended: "PHP Video Tutorial"

1 php -m
Display modules compiled into the kernel

Summarize some common commands under the php command line

2 php -v
Display php version number

Summarize some common commands under the php command line

3 php --ini
Display configuration file name

Summarize some common commands under the php command line

4 php -h
Display which command line commands are available

Summarize some 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 < ;name>

Display information about the class

8 php --re

Display information about the extension

9 php --ri

Display the configuration information of the extension

10 php --rz

Display the name information about the 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 => $arg) {

echo "    {$index} : {$arg}\n";
Copy after login
}

Our command line runs php index.php 1 2 3

The output result is as follows:

Summarize some common commands under the php command line

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

Related labels:
php
source:segmentfault.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!