Common commands under the PHP command line

Source: Internet
Author: User
This article for you to share some of the common commands under the PHP command line, the need for friends can refer to

1 php-m
Display the modules compiled into the kernel

2 Php-v
Show PHP Version number

3 PHP--ini
Show Profile Name

4 php-h
Shows which command-line commands are available

5 PHP--info
View class/function/extension information, like PHP using Phpinfo () on a Web server

6 PHP--rf <name>
Display information about the <name> function

7 PHP--RC <name>
Display information about the <name> class

8 PHP--re <name>
Display information about the <name> extension

9 php--ri <name>
Display Extended <name> configuration information

PHP--rz <name>
Display name information about the Zend extension

11 Development of command-line scripting

(1) $ARGV is an array that contains the supplied arguments, where the first parameter is the name of the file
(2) $ARGC is the number of parameters

eg
We have a index.php this script
<?php

Echo ' command line argument number: '. $ARGC. "N";
echo "Command-line arguments: n";
foreach ($argv as $index = = $arg) {

echo "    {$index}: {$arg}\n";

}

Our command line runs PHP index.php 1 2 3

The results of the output are as follows:

Related recommendations:

PHP Common Commands _php Tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.